OIDC/ move OIDC salt service to oidc-server#73
Merged
matias-gonz merged 8 commits intofeat/oidc-account-recoveryfrom Feb 19, 2025
Merged
OIDC/ move OIDC salt service to oidc-server#73matias-gonz merged 8 commits intofeat/oidc-account-recoveryfrom
matias-gonz merged 8 commits intofeat/oidc-account-recoveryfrom
Conversation
rename oidc-key-registry-server to oidc-server
update lock file
move salt service
remove jose from authserver
|
Visit the preview URL for this PR (updated for commit 9a31507): https://zksync-auth-server-staging--pr73-oidc-move-salt-servi-dv71o5au.web.app (expires Wed, 26 Feb 2025 14:27:51 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: 509a9c9ea42583076f531c53cf2979c544d5d0b7 |
matias-gonz
commented
Feb 19, 2025
| config(); | ||
|
|
||
| const app = express(); | ||
| const PORT = process.env.SALT_SERVICE_PORT || 3003; |
Member
Author
There was a problem hiding this comment.
This is arbitrary, we can change it
There was a problem hiding this comment.
The port could be part of the same env object that we already had.
export const env = createEnv({
server: {
FETCH_INTERVAL: z.preprocess(
(val) => (val === undefined ? 60 * 1000 : Number(val)),
z.number(),
),
ZKSYNC_PRIVATE_KEY: z.string(),
CONTRACT_ADDRESS: z.string(),
NETWORK: z.enum(validNetworks).optional(),
RPC_URL: z.string().url().optional(),
SALT_SERVICE_PORT: z.coerce.number().default(3003),
},
runtimeEnv: process.env,
emptyStringAsUndefined: true,
});
calvogenerico
approved these changes
Feb 19, 2025
| config(); | ||
|
|
||
| const app = express(); | ||
| const PORT = process.env.SALT_SERVICE_PORT || 3003; |
There was a problem hiding this comment.
The port could be part of the same env object that we already had.
export const env = createEnv({
server: {
FETCH_INTERVAL: z.preprocess(
(val) => (val === undefined ? 60 * 1000 : Number(val)),
z.number(),
),
ZKSYNC_PRIVATE_KEY: z.string(),
CONTRACT_ADDRESS: z.string(),
NETWORK: z.enum(validNetworks).optional(),
RPC_URL: z.string().url().optional(),
SALT_SERVICE_PORT: z.coerce.number().default(3003),
},
runtimeEnv: process.env,
emptyStringAsUndefined: true,
});
| const iss = payload.iss; | ||
| const aud = payload.aud; | ||
| const sub = payload.sub; | ||
| const iss = payload.iss as string; |
There was a problem hiding this comment.
If this can be undefined we should handle this. If it cannot be we can use zod that it's already included to do a nice parse of the payload object.
use createEnv
parse jwt payload with zod
rename jwks
add jwks to dict
calvogenerico
approved these changes
Feb 19, 2025
cpb8010
pushed a commit
that referenced
this pull request
Jul 16, 2025
* chore: rename oidc-key-registry-server to oidc-server rename oidc-key-registry-server to oidc-server * chore: update lock file update lock file * chore: move salt service move salt service * chore: remove jose from authserver remove jose from authserver * refactor: use createEnv use createEnv * refactor: parse jwt payload with zod parse jwt payload with zod * chore: rename jwks rename jwks * fix: add jwks to dict add jwks to dict
cpb8010
pushed a commit
that referenced
this pull request
Jul 16, 2025
* chore: rename oidc-key-registry-server to oidc-server rename oidc-key-registry-server to oidc-server * chore: update lock file update lock file * chore: move salt service move salt service * chore: remove jose from authserver remove jose from authserver * refactor: use createEnv use createEnv * refactor: parse jwt payload with zod parse jwt payload with zod * chore: rename jwks rename jwks * fix: add jwks to dict add jwks to dict
cpb8010
pushed a commit
that referenced
this pull request
Jul 16, 2025
* chore: rename oidc-key-registry-server to oidc-server rename oidc-key-registry-server to oidc-server * chore: update lock file update lock file * chore: move salt service move salt service * chore: remove jose from authserver remove jose from authserver * refactor: use createEnv use createEnv * refactor: parse jwt payload with zod parse jwt payload with zod * chore: rename jwks rename jwks * fix: add jwks to dict add jwks to dict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Moves salt service to oidc-server package