@@ -291,16 +291,21 @@ const AMRMethods = [
291291 'sso/saml' ,
292292 'magiclink' ,
293293 'web3' ,
294+ 'oauth_provider/authorization_code' ,
294295] as const
295296
296297export type AMRMethod = ( typeof AMRMethods ) [ number ] | ( string & { } )
297298
298299/**
299- * An authentication methord reference (AMR) entry.
300+ * An authentication method reference (AMR) entry.
300301 *
301302 * An entry designates what method was used by the user to verify their
302303 * identity and at what time.
303304 *
305+ * Note: Custom access token hooks can return AMR claims as either:
306+ * - An array of AMREntry objects (detailed format with timestamps)
307+ * - An array of strings (RFC-8176 compliant format)
308+ *
304309 * @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel }.
305310 */
306311export interface AMREntry {
@@ -1181,8 +1186,12 @@ export type AuthMFAGetAuthenticatorAssuranceLevelResponse = RequestResult<{
11811186 * A list of all authentication methods attached to this session. Use
11821187 * the information here to detect the last time a user verified a
11831188 * factor, for example if implementing a step-up scenario.
1189+ *
1190+ * Supports both RFC-8176 compliant format (string[]) and detailed format (AMREntry[]).
1191+ * - String format: ['password', 'otp'] - RFC-8176 compliant
1192+ * - Object format: [{ method: 'password', timestamp: 1234567890 }] - includes timestamps
11841193 */
1185- currentAuthenticationMethods : AMREntry [ ]
1194+ currentAuthenticationMethods : AMREntry [ ] | string [ ]
11861195} >
11871196
11881197/**
@@ -1501,7 +1510,13 @@ export interface JwtPayload extends RequiredClaims {
15011510 nbf ?: number
15021511 app_metadata ?: UserAppMetadata
15031512 user_metadata ?: UserMetadata
1504- amr ?: AMREntry [ ]
1513+ /**
1514+ * Authentication Method References.
1515+ * Supports both RFC-8176 compliant format (string[]) and detailed format (AMREntry[]).
1516+ * - String format: ['password', 'otp'] - RFC-8176 compliant
1517+ * - Object format: [{ method: 'password', timestamp: 1234567890 }] - includes timestamps
1518+ */
1519+ amr ?: AMREntry [ ] | string [ ]
15051520
15061521 // Special claims (only in anon/service role tokens)
15071522 ref ?: string
0 commit comments