Commit Graph

423 Commits

Author SHA1 Message Date
Jonathan Barrow
6e99715f85
fix: add try-catch to Discourse data scrubbing 2025-10-03 16:22:17 -04:00
Jonathan Barrow
cda6f85399
feat: add automatic Miiverse data removal on PNID scrub 2025-10-03 13:58:23 -04:00
Jonathan Barrow
f5faf8aac7
feat: add DeleteAccount gRPC methods 2025-10-03 13:46:41 -04:00
Jonathan Barrow
8f1cd2c2d6
feat: automatically anonymize Discourse users on PNID scrub 2025-10-03 13:41:07 -04:00
Jonathan Barrow
195f9541f1
feat: automatically delete Stripe user, not just sub, on PNID scrub 2025-10-03 13:40:48 -04:00
Jonathan Barrow
13fd7a76a4
chore: enable proxy trusting
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled
2025-09-02 19:10:44 -04:00
Jonathan Barrow
794eac6f56
feat: add getAgeFromDate util function 2025-09-02 19:09:31 -04:00
Jonathan Barrow
fe75d36945
fix: add some more input validation to /v1/register 2025-09-02 18:38:48 -04:00
Jonathan Barrow
9d18028432
feat: make mississippi checker optional 2025-09-02 18:28:08 -04:00
Jonathan Barrow
a088c29822
feat(nnas/api): add Mississippi check at registration 2025-08-27 15:50:59 -04:00
Daniel López Guimaraes
98b76f0e8f
chore(nasc): Add TODO for supporting locating servers by game server ID 2025-08-09 19:55:46 +01:00
Daniel López Guimaraes
915b7b62b2
feat(nasc): Add enforcement of custom patches to required titles
If the supplied game server ID doesn't match the one present on the
server database, then assume the title requires patches on the user's
end. Give this behavior a custom error code 002-0152 to facilitate
support to unaware users.

Also drop the legacy fallback of the friends server to the test
environment, since the server should be available to anyone anyway, and
we already have the production config for it.

Alongside that, update the maintenance error code to use the proper
002-0101 as expected.
2025-07-30 17:11:00 +01:00
Jonathan Barrow
d267d8da0f
Merge pull request #189 from PretendoNetwork/chore/token-update
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled
2025-06-25 17:55:40 -04:00
Ash Logan
1de03590ee fix: Don't need SystemType.CTR tokens
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled
2025-06-25 14:05:20 +10:00
Jonathan Barrow
8fa0ee16ae
fix: remove unique constraint from 6 digit email code 2025-06-23 14:42:30 -04:00
Ash Logan
b9cf3194fc fix: Seperate token checks by type
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled
Give each expected token type a seperate function and un-export the "generic" one.

This required deciding what the "expected" token type is for all endpoints. Possibly contraversial choices are:

- API tokens only on the HTTP API (no service tokens)
- API tokens only on the gRPC APIs
- API tokens only on ExchangeTokenForUserData (I could only find 1 user of this API - BOSS - and they use API tokens here)

Notably, there is now no way to get the account server to validate a service token - services must decrypt them locally. We should probably add an API for this for the benefit of third parties.
2025-06-22 19:54:27 +10:00
Ash Logan
fc1963363a feat: up refresh tokens on v2 grpc api to 12 hour expiry
Some checks are pending
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Waiting to run
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Waiting to run
2025-06-22 12:46:01 +10:00
Ash Logan
545ef69727 Merge branch 'dev' into chore/token-update 2025-06-22 12:37:01 +10:00
Jonathan Barrow
18940dd681
feat: allow independent services to expire their own tokens 2025-06-21 17:49:50 -04:00
Jonathan Barrow
983ee92c9e
feat: up refresh tokens to be valid for 12 hours 2025-06-21 17:39:59 -04:00
Jonathan Barrow
6450f3256e
chore: update Token/TokenOptions types to use SystemType and TokenType 2025-06-21 17:29:47 -04:00
Jonathan Barrow
2e5e692cef
fix: update remaining magic numbers for system/token types 2025-06-21 17:27:49 -04:00
Jonathan Barrow
fb616c471c
chore: remove magic numbers for system types 2025-06-21 17:23:17 -04:00
Jonathan Barrow
9d02fce19d
chore: remove magic numbers for token types 2025-06-21 17:15:52 -04:00
Ash Logan
91dace2e96 Merge remote-tracking branch 'origin/dev' into work/add-account-devices
Some checks failed
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Has been cancelled
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Has been cancelled
2025-06-20 23:05:55 +10:00
Jonathan Barrow
bb7a1397a6
fix: handle null token generation in grpc 2025-06-18 18:55:13 -04:00
Jonathan Barrow
fecb062fc1
fix: update imports for eslint 2025-06-18 18:14:39 -04:00
Jonathan Barrow
209f95f20e
fix: update Node types 2025-06-18 18:13:51 -04:00
Jonathan Barrow
3b202021f8
Merge pull request #181 from PretendoNetwork/chore/3ds-pnid-link
Some checks are pending
Build and Publish Docker Image / Build and Publish Docker Image (amd64) (push) Waiting to run
Build and Publish Docker Image / Build and Publish Docker Image (arm64) (push) Waiting to run
2025-06-18 17:38:12 -04:00
Jonathan Barrow
eac5ec9742
feat: implement v2 grpc servers
adds support for the new v2 gRPC servers while maintaining the old ones for legacy clients
2025-06-17 16:55:38 -04:00
Ash Logan
84922a5c51 feat(account): Add device linking data to GetUserData(pid)
This API will be useful for Juxt and other services that want to use device linking for moderation purposes. The data is pretty minimalist to start with to limit exposure.

Requires https://github.com/PretendoNetwork/grpc/pull/3
2025-06-15 00:50:26 +10:00
Daniel López Guimaraes
0209d8bb88
fix: Reapply restriction for NNAS only allowing console tokens 2025-06-08 23:51:07 +01:00
Jonathan Barrow
3f6cdb96c9
fix: remove WUP check when adding PNID to device in oauth 2025-05-31 16:26:43 -04:00
William Oldham
6c04fbd68c style: do eslint format 2025-05-19 23:44:21 +01:00
Jonathan Barrow
a1b5cea250
chore: revert support revert
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
2025-05-09 18:44:03 -04:00
Jonathan Barrow
6434e7ce13
chore: revert pnid middleware token type check revert 2025-05-09 18:43:41 -04:00
Jonathan Barrow
959af6997d
chore: revert certificate revert 2025-05-09 18:25:57 -04:00
William Oldham
1a3445db5b chore: revert auth-update changes and hotpatches related
Commits:
- f349b9de42
- b9966807c3
- 0bc3af0507
- 008a517947
2025-05-09 18:08:47 +01:00
William Oldham
056e773fe8 style: unused variable in logger
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
2025-04-08 22:58:32 +01:00
William Oldham
f349b9de42 fix: don't use the in operator for checking in an array 2025-04-08 22:56:32 +01:00
William Oldham
0a234156c0 chore: add error logging to api middleware 2025-04-08 22:49:58 +01:00
William Oldham
8d647ef2d1 chore: pad numbers in logger 2025-04-08 22:49:47 +01:00
William Oldham
b9966807c3 chore: tidy up unneeded null handling for token generation 2025-04-08 22:18:44 +01:00
William Oldham
0bc3af0507 fix: handle title_id nullability
Some checks are pending
Build and Publish Docker Image / build-publish (push) Waiting to run
2025-04-08 22:09:21 +01:00
William Oldham
dc5b885e0f chore: add better logging to login and register routes
Some checks are pending
Build and Publish Docker Image / build-publish (push) Waiting to run
2025-04-08 00:28:56 +01:00
Jonathan Barrow
d59c6ef226
Merge branch 'dev' into auth-updates
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
2025-04-07 15:36:11 -04:00
Jonathan Barrow
97d5d88008
fix(grpc): add explicit token type check for refresh tokens 2025-04-07 14:39:51 -04:00
Jonathan Barrow
6087dc68ce
fix(nnas): correct error message for missing country header 2025-04-07 14:37:15 -04:00
Jonathan Barrow
9c92cfda3b
chore(nnas): remove outdated TODO in PNID middleware
Some checks failed
Build and Publish Docker Image / build-publish (push) Has been cancelled
2025-02-03 16:56:59 -05:00
Jonathan Barrow
37971c006d
refactor(nnas): check headers and device status in all possible endpoints
Some checks are pending
Build and Publish Docker Image / build-publish (push) Waiting to run
2025-02-03 13:22:30 -05:00