scopedKeys
Call Signature
Section titled “Call Signature”scopedKeys<
P,K>(params):`openid:${{ apple: "https://appleid.apple.com"; google: "https://accounts.google.com"; microsoft: "https://login.microsoftonline.com/{tid}/v2.0" }[P]}:${K}`[]
Defined in: src/client/auth-client.ts:1691
Scopes attribute keys to an OpenID provider.
When using one-click sign-in, attributes can be scoped to the same provider so the user grants access in a single step without an additional prompt.
Type Parameters
Section titled “Type Parameters”P extends "google" | "apple" | "microsoft"
K extends string = "name" | "email" | "verified_email"
Parameters
Section titled “Parameters”params
Section titled “params”readonly K[]
The attribute keys to scope. Defaults to ['name', 'email', 'verified_email'].
openIdProvider
Section titled “openIdProvider”P
The OpenID provider the keys should be scoped to.
ssoDomain?
Section titled “ssoDomain?”undefined
Returns
Section titled “Returns”`openid:${{ apple: "https://appleid.apple.com"; google: "https://accounts.google.com"; microsoft: "https://login.microsoftonline.com/{tid}/v2.0" }[P]}:${K}`[]
The scoped attribute keys as openid:<provider-url>:<key>.
Example
Section titled “Example”scopedKeys({ openIdProvider: 'google', keys: ['email'] });// ['openid:https://accounts.google.com:email']Call Signature
Section titled “Call Signature”scopedKeys<
D,K>(params):`sso:${Lowercase<D>}:${K}`[]
Defined in: src/client/auth-client.ts:1714
Scopes attribute keys to an organization’s SSO.
When using one-click SSO sign-in, attributes can be scoped to the same organization so the user grants access in a single step.
Type Parameters
Section titled “Type Parameters”D extends string
K extends string = "name" | "email"
Parameters
Section titled “Parameters”params
Section titled “params”readonly K[]
The attribute keys to scope. Defaults to ['name', 'email'];
verified_email is not available for an organization SSO.
openIdProvider?
Section titled “openIdProvider?”undefined
ssoDomain
Section titled “ssoDomain”D
The organization domain the keys should be scoped to.
Returns
Section titled “Returns”`sso:${Lowercase<D>}:${K}`[]
The scoped attribute keys as sso:<domain>:<key>.
Example
Section titled “Example”scopedKeys({ ssoDomain: 'dfinity.org', keys: ['email'] });// ['sso:dfinity.org:email']