Skip to content

OIDC/ move OIDC salt service to oidc-server#73

Merged
matias-gonz merged 8 commits intofeat/oidc-account-recoveryfrom
oidc/move-salt-service
Feb 19, 2025
Merged

OIDC/ move OIDC salt service to oidc-server#73
matias-gonz merged 8 commits intofeat/oidc-account-recoveryfrom
oidc/move-salt-service

Conversation

@matias-gonz
Copy link
Member

@matias-gonz matias-gonz commented Feb 19, 2025

Description

Moves salt service to oidc-server package

rename oidc-key-registry-server to oidc-server
@matias-gonz matias-gonz changed the title chore: rename oidc-key-registry-server to oidc-server OIDC/ move OIDC salt service to oidc-server Feb 19, 2025
update lock file
move salt service
remove jose from authserver
@github-actions
Copy link

github-actions bot commented Feb 19, 2025

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

config();

const app = express();
const PORT = process.env.SALT_SERVICE_PORT || 3003;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is arbitrary, we can change it

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,
});

config();

const app = express();
const PORT = process.env.SALT_SERVICE_PORT || 3003;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@matias-gonz matias-gonz merged commit d9b003d into feat/oidc-account-recovery Feb 19, 2025
4 checks passed
@matias-gonz matias-gonz deleted the oidc/move-salt-service branch February 19, 2025 14:44
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants