[Session] Consistently copy SessionAgent fields (#3779)
Co-authored-by: Eric Bailey <git@esb.lol>zio/stable
parent
80bcf81dc5
commit
339f26567a
|
@ -142,6 +142,7 @@ function createPersistSessionHandler(
|
||||||
handle: session?.handle || account.handle,
|
handle: session?.handle || account.handle,
|
||||||
email: session?.email || account.email,
|
email: session?.email || account.email,
|
||||||
emailConfirmed: session?.emailConfirmed || account.emailConfirmed,
|
emailConfirmed: session?.emailConfirmed || account.emailConfirmed,
|
||||||
|
emailAuthFactor: session?.emailAuthFactor || account.emailAuthFactor,
|
||||||
deactivated: isSessionDeactivated(session?.accessJwt),
|
deactivated: isSessionDeactivated(session?.accessJwt),
|
||||||
pdsUrl: agent.pdsUrl?.toString(),
|
pdsUrl: agent.pdsUrl?.toString(),
|
||||||
|
|
||||||
|
@ -271,8 +272,9 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||||
service: agent.service.toString(),
|
service: agent.service.toString(),
|
||||||
did: agent.session.did,
|
did: agent.session.did,
|
||||||
handle: agent.session.handle,
|
handle: agent.session.handle,
|
||||||
email: agent.session.email!, // TODO this is always defined?
|
email: agent.session.email,
|
||||||
emailConfirmed: false,
|
emailConfirmed: agent.session.emailConfirmed,
|
||||||
|
emailAuthFactor: agent.session.emailAuthFactor,
|
||||||
refreshJwt: agent.session.refreshJwt,
|
refreshJwt: agent.session.refreshJwt,
|
||||||
accessJwt: agent.session.accessJwt,
|
accessJwt: agent.session.accessJwt,
|
||||||
deactivated,
|
deactivated,
|
||||||
|
@ -324,7 +326,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||||
did: agent.session.did,
|
did: agent.session.did,
|
||||||
handle: agent.session.handle,
|
handle: agent.session.handle,
|
||||||
email: agent.session.email,
|
email: agent.session.email,
|
||||||
emailConfirmed: agent.session.emailConfirmed || false,
|
emailConfirmed: agent.session.emailConfirmed,
|
||||||
emailAuthFactor: agent.session.emailAuthFactor,
|
emailAuthFactor: agent.session.emailAuthFactor,
|
||||||
refreshJwt: agent.session.refreshJwt,
|
refreshJwt: agent.session.refreshJwt,
|
||||||
accessJwt: agent.session.accessJwt,
|
accessJwt: agent.session.accessJwt,
|
||||||
|
@ -506,8 +508,8 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
|
||||||
did: agent.session.did,
|
did: agent.session.did,
|
||||||
handle: agent.session.handle,
|
handle: agent.session.handle,
|
||||||
email: agent.session.email,
|
email: agent.session.email,
|
||||||
emailConfirmed: agent.session.emailConfirmed || false,
|
emailConfirmed: agent.session.emailConfirmed,
|
||||||
emailAuthFactor: agent.session.emailAuthFactor || false,
|
emailAuthFactor: agent.session.emailAuthFactor,
|
||||||
refreshJwt: agent.session.refreshJwt,
|
refreshJwt: agent.session.refreshJwt,
|
||||||
accessJwt: agent.session.accessJwt,
|
accessJwt: agent.session.accessJwt,
|
||||||
deactivated: isSessionDeactivated(agent.session.accessJwt),
|
deactivated: isSessionDeactivated(agent.session.accessJwt),
|
||||||
|
|
Loading…
Reference in New Issue