Post Login events called by SDK

🔁 REL-ID SDK Events Triggered After onUserLoggedIn

After the onUserLoggedIn event, the REL-ID SDK automatically emits the following events to manage session and credential updates:


📋 Event List

Event NameDescription
onCredentialsAvailableForUpdateSDK emits this event to inform that some credentials (e.g. password, SecQA) can be updated.
onAccessTokenRefreshedTriggered when a new JWT access token is issued after login.
onUserLoggedOff (eventually)Triggered when user session ends and logout completes.

🧠 Event Descriptions

1. onCredentialsAvailableForUpdate

  • Purpose: Informs the application that credentials are eligible for update.
  • Triggers:
    • Automatically after onUserLoggedIn
    • Manually via getAllChallenges()
  • Expected App Action:
    • Show user options to update credentials
    • Call initiateUpdateFlowForCredential() with selected credential

2. onAccessTokenRefreshed

  • Purpose: Notifies the application of a new access token for the active user session.
  • Triggers:
    • Post-login JWT refresh
    • Prior to JWT expiry for token renewal
  • Expected App Action:
    • Store updated access token for authenticated API calls

3. onUserLoggedOff

  • Purpose: Indicates the user session is terminated.
  • Triggers:
    • User logs out manually
    • Session times out
  • Expected App Action:
    • Navigate to login screen or show session expired UI

📌 Summary Diagram (Mermaid)

sequenceDiagram
    participant SDK
    participant App

    SDK-->>App: onUserLoggedIn
    SDK-->>App: onCredentialsAvailableForUpdate
    SDK-->>App: onAccessTokenRefreshed
    App->>User: App session continues...
    App->>SDK: logout() (optional)
    SDK-->>App: onUserLoggedOff