Skip to main content
Returns the parameters used to create the current AuthSession. Use this to access credentials or configuration values that were provided when the AuthSession was created. This function only works with Credentials-based AuthSessions. It allows your automation to access the original parameters (like usernames, API keys, or other identifiers) without hardcoding them. Returns Returns Promise<any> — The parameters object used to create the AuthSession. Throws
  • Error — Thrown if the project doesn’t use AuthSessions.
  • Error — Thrown if the AuthSession is Recorder-based (not Credentials-based).
  • Error — Thrown if the AuthSession is Runtime-based.

Example: branching on a login flow

When a single site exposes more than one login flow (for example, separate provider and patient logins on the same portal), include a discriminator parameter when the AuthSession is created and read it back inside check to validate the correct post-login state.
auth-sessions/create.ts
auth-sessions/check.ts
When the AuthSession is created with parameters.loginType: "provider", both create and check follow the provider flow; passing "patient" switches both to the patient flow.