MonoCloud Authentication SDK
    Preparing search index...
    OnSessionCreating: (
        session: MonoCloudSession,
        idToken?: Partial<IdTokenClaims>,
        userInfo?: UserinfoResponse,
        state?: ApplicationState,
    ) => Promise<void> | void

    Callback invoked before a session is created or updated.

    Use this hook to modify or enrich the session before it is persisted. The callback receives the resolved session along with optional claims obtained during authentication and any custom application state.

    Common use cases include:

    • Adding custom properties to the session
    • Mapping or filtering claims
    • Attaching tenant or application-specific metadata

    Type Declaration

      • (
            session: MonoCloudSession,
            idToken?: Partial<IdTokenClaims>,
            userInfo?: UserinfoResponse,
            state?: ApplicationState,
        ): Promise<void> | void
      • Parameters

        • session: MonoCloudSession

          The session being created or updated. Changes made to this object are persisted.

        • OptionalidToken: Partial<IdTokenClaims>

          Optional claims extracted from the ID token.

        • OptionaluserInfo: UserinfoResponse

          Optional claims returned from the UserInfo endpoint.

        • Optionalstate: ApplicationState

          Optional application state created during the authentication request.

        Returns Promise<void> | void

        Returns a promise or void. Execution continues once the callback completes.