Skip to content

Commit

Permalink
pass projectAccessKey on session load as well
Browse files Browse the repository at this point in the history
  • Loading branch information
pkieltyka committed Dec 14, 2024
1 parent 0b5a39f commit 5f41b05
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/auth/src/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,8 +321,9 @@ export class Session {
dump: SessionDumpV1 | SessionDumpV2
editConfigOnMigration: (config: commons.config.Config) => commons.config.Config
onMigration?: (account: Account) => Promise<boolean>
projectAccessKey?: string
}): Promise<Session> {
const { dump, settings, editConfigOnMigration, onMigration, orchestrator } = args
const { dump, settings, editConfigOnMigration, onMigration, orchestrator, projectAccessKey } = args
const { contexts, networks, tracker, services } = { ...SessionSettingsDefault, ...settings }

let account: Account
Expand All @@ -343,7 +344,8 @@ export class Session {
networks,
contexts,
orchestrator,
jwt: jwtExpired ? undefined : dump.jwt?.token
jwt: jwtExpired ? undefined : dump.jwt?.token,
projectAccessKey
})

// TODO: This property may not hold if the user adds a new network
Expand All @@ -370,7 +372,8 @@ export class Session {
networks,
contexts,
orchestrator,
jwt: jwtExpired ? undefined : dump.jwt?.token
jwt: jwtExpired ? undefined : dump.jwt?.token,
projectAccessKey
})
} else {
throw Error('Invalid dump format')
Expand Down

0 comments on commit 5f41b05

Please sign in to comment.