The Session object being created.
OptionalidToken: Partial<IdTokenClaims>Optional. Claims from the ID token received during authentication.
OptionaluserInfo: UserinfoResponseOptional. Claims from the user information received during authentication.
Optionalstate: ApplicationStateOptional. The application state associated with the session.
A Promise that resolves when the operation is completed, or void.
Defines a callback function to be executed when a new session is being created or updated. This function receives parameters related to the session being created, including the session object itself, optional ID token and user information claims, and the application state.