We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 061e05f commit 7fa4738Copy full SHA for 7fa4738
src/kit.ts
@@ -505,6 +505,16 @@ export class SessionKit {
505
// Call the `afterLogin` hooks that were registered by the LoginPlugins
506
for (const hook of context.hooks.afterLogin) await hook(context)
507
508
+
509
+ // Offer session key setup if configured and session does not have one yet
510
+ if (this.sessionKeyManager && !session.hasSessionKey()) {
511
+ try {
512
+ await session.setupSessionKey()
513
+ } catch (e) {
514
+ // User cancelled or setup failed - continue with regular session
515
+ // This is not a fatal error, the session is still valid
516
+ }
517
518
// Save the session to storage if it has a storage instance.
519
this.persistSession(session, options?.setAsDefault)
520
0 commit comments