Skip to main content

GoogleParameters

@webda/google-auth


Class: GoogleParameters

Defined in: google-auth/src/google-auth.service.ts:41

Google login parameters https://developers.google.com/identity/protocols/oauth2/openid-connect

Extends​

  • OAuthProviderParameters

Constructors​

Constructor​

new GoogleParameters(): GoogleParameters

Returns​

GoogleParameters

Inherited from​

OAuthProviderParameters.constructor

Properties​

access_type?​

optional access_type?: "online" | "offline"

Defined in: google-auth/src/google-auth.service.ts:61

Type of access: "offline" also returns a refresh token (stored encrypted in the ident tokens)

Default​

"online"

allowedEmailDomains?​

optional allowedEmailDomains?: string[]

Defined in: auth/lib/oauth/oauth.service.d.ts:102

Only these email domains may use this provider (see ProviderEmailPolicy)

Inherited from​

OAuthProviderParameters.allowedEmailDomains


audiences?​

optional audiences?: string[]

Defined in: google-auth/src/google-auth.service.ts:66

Other client ids whose ID tokens Auth.Google.Token accepts (for example Android/iOS client ids)

Default​

[]

auth_options?​

optional auth_options?: Record<string, any>

Defined in: google-auth/src/google-auth.service.ts:77

Additional authorization url parameters (for example prompt, login_hint); cannot override state, redirect_uri, scope, access_type, response_type, code_challenge*, nonce nor hd See https://developers.google.com/identity/protocols/oauth2/openid-connect#authenticationuriparameters


authorized_uris​

authorized_uris: string[]

Defined in: auth/lib/oauth/oauth.service.d.ts:95

Allowed post-login targets for the redirect query parameter of the login route: absolute http(s) urls, a target matches when it has the same origin and its path is the listed path or below it

Default​

[]

Inherited from​

OAuthProviderParameters.authorized_uris


client_id​

client_id: string

Defined in: google-auth/src/google-auth.service.ts:45

Google OAuth client id (web application)

Overrides​

OAuthProviderParameters.client_id


client_secret​

client_secret: string | SecretString

Defined in: google-auth/src/google-auth.service.ts:51

Google OAuth client secret

Can be encrypted with webda config encrypt

Overrides​

OAuthProviderParameters.client_secret


hostedDomain?​

optional hostedDomain?: string

Defined in: google-auth/src/google-auth.service.ts:71

Only accept Google Workspace accounts of this domain (the hd claim of the ID token); also sent as a hint to the account chooser


redirect_uri?​

optional redirect_uri?: string

Defined in: auth/lib/oauth/oauth.service.d.ts:89

Callback url registered at the provider

Default​

"<absolute url of the request>/callback"; set it explicitly behind a proxy

Inherited from​

OAuthProviderParameters.redirect_uri


redirects​

redirects: OAuthRedirects

Defined in: auth/lib/oauth/oauth.service.d.ts:100

Browser redirects of the callback

Default​

{ "success": "/" }

Inherited from​

OAuthProviderParameters.redirects


scope?​

optional scope?: string[]

Defined in: google-auth/src/google-auth.service.ts:56

Scopes requested from Google

Default​

["openid", "email", "profile"]

Overrides​

OAuthProviderParameters.scope


trustEmailVerification?​

optional trustEmailVerification?: boolean | string[]

Defined in: auth/lib/oauth/oauth.service.d.ts:104

Whether the verification of the email is believed (see ProviderEmailPolicy)

Inherited from​

OAuthProviderParameters.trustEmailVerification


type​

type: string

Defined in: core/lib/services/serviceparameters.d.ts:9

Type of the service

Inherited from​

OAuthProviderParameters.type


url?​

optional url?: string

Defined in: auth/lib/oauth/oauth.service.d.ts:70

Route prefix of the login (<url>) and callback (<url>/callback) routes

Default​

"/auth/<providerName>"

Inherited from​

OAuthProviderParameters.url

Methods​

load()​

load(params?): this

Defined in: google-auth/src/google-auth.service.ts:83

Parameters​

params?​

any = {}

raw parameters

Returns​

this

this

Overrides​

OAuthProviderParameters.load


update()​

update(params, delta): this

Defined in: core/lib/application/parameters.d.ts:21

Update parameters and call watchers if a parameter was changed

Parameters​

params​

any

the service parameters

delta​

any

the delta

Returns​

this

this for chaining

Inherited from​

OAuthProviderParameters.update


with()​

with(callback): this

Defined in: core/lib/application/parameters.d.ts:27

Watch for changes on the parameters and call watchers when a parameter is changed

Parameters​

callback​

(params) => void

the callback function

Returns​

this

this for chaining

Inherited from​

OAuthProviderParameters.with