You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+44Lines changed: 44 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -123,6 +123,7 @@ with optional overrides.
123
123
***customHeaders** - (`object`) _ANDROID_ you can specify custom headers to pass during authorize request and/or token request.
124
124
***authorize** - (`{ [key: string]: value }`) headers to be passed during authorization request.
125
125
***token** - (`{ [key: string]: value }`) headers to be passed during token retrieval request.
126
+
***register** - (`{ [key: string]: value }`) headers to be passed during registration request.
126
127
***useNonce** - (`boolean`) _IOS_ (default: true) optionally allows not sending the nonce parameter, to support non-compliant providers
127
128
***usePKCE** - (`boolean`) (default: true) optionally allows not sending the code_challenge parameter and skipping PKCE code verification, to support non-compliant providers.
128
129
@@ -179,6 +180,49 @@ const result = await revoke(config, {
179
180
});
180
181
```
181
182
183
+
184
+
### `register`
185
+
186
+
This will perform [dynamic client registration](https://openid.net/specs/openid-connect-registration-1_0.html) on the given provider.
187
+
If the provider supports dynamic client registration, it will generate a `clientId` for you to use in subsequent calls to this library.
***issuer** - (`string`) same as in authorization config
203
+
***serviceConfiguration** - (`object`) same as in authorization config
204
+
***redirectUrls** - (`array<string>`) _REQUIRED_ specifies all of the redirect urls that your client will use for authentication
205
+
***responseTypes** - (`array<string>`) an array that specifies which [OAuth 2.0 response types](https://openid.net/specs/oauth-v2-multiple-response-types-1_0.html) your client will use. The default value is `['code']`
206
+
***grantTypes** - (`array<string>`) an array that specifies which [OAuth 2.0 grant types](https://oauth.net/2/grant-types/) your client will use. The default value is `['authorization_code']`
207
+
***subjectType** - (`string`) requests a specific [subject type](https://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes) for your client
208
+
***tokenEndpointAuthMethod** (`string`) specifies which `clientAuthMethod` your client will use for authentication. The default value is `'client_secret_basic'`
209
+
***additionalParameters** - (`object`) additional parameters that will be passed in the registration request.
210
+
Must be string values! E.g. setting `additionalParameters: { hello: 'world', foo: 'bar' }` would add
211
+
`hello=world&foo=bar` to the authorization request.
212
+
***dangerouslyAllowInsecureHttpRequests** - (`boolean`) _ANDROID_ same as in authorization config
213
+
***customHeaders** - (`object`) _ANDROID_ same as in authorization config
214
+
215
+
#### registerResult
216
+
217
+
This is the result from the auth server
218
+
219
+
***clientId** - (`string`) the assigned client id
220
+
***clientIdIssuedAt** - (`string`) _OPTIONAL_ date string of when the client id was issued
221
+
***clientSecret** - (`string`) _OPTIONAL_ the assigned client secret
222
+
***clientSecretExpiresAt** - (`string`) date string of when the client secret expires, which will be provided if `clientSecret` is provided. If `new Date(clientSecretExpiresAt).getTime() === 0`, then the secret never expires
223
+
***registrationClientUri** - (`string`) _OPTIONAL_ uri that can be used to perform subsequent operations on the registration
224
+
***registrationAccessToken** - (`string`) token that can be used at the endpoint given by `registrationClientUri` to perform subsequent operations on the registration. Will be provided if `registrationClientUri` is provided
0 commit comments