mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-11 23:50:06 +01:00
Merge pull request #17 from matmunn/allow-adding-custom-options
Allow passing through extra options to oidc-client
This commit is contained in:
commit
81ad5ae7a0
2 changed files with 7 additions and 0 deletions
|
|
@ -49,6 +49,10 @@ const metadata = {
|
|||
redirect_uri="https://darrelopry.com/svelte-oidc/"
|
||||
post_logout_redirect_uri="https://darrelopry.com/svelte-oidc/"
|
||||
metadata={metadata}
|
||||
extraOptions={{
|
||||
mergeClaims: true,
|
||||
resource: "some_identifier",
|
||||
}}
|
||||
>
|
||||
|
||||
<LoginButton>Login</LoginButton>
|
||||
|
|
@ -113,6 +117,7 @@ the migration hard.
|
|||
* redirect_uri - default: window.location.href
|
||||
* post_logout_redirect_uri - override the default url that OIDC will redirect to after logout. default: window.location.href
|
||||
* metadata - set default metadata or metadata missing from authority.
|
||||
* extraOptions - An object of extra options that will be passed to the underlying OpenID Connect client. Valid values are available [here](https://github.com/IdentityModel/oidc-client-js/wiki#other-optional-settings).
|
||||
|
||||
* LoginButton - log out the current context
|
||||
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
export let client_id;
|
||||
export let redirect_uri;
|
||||
export let post_logout_redirect_uri;
|
||||
export let extraOptions = {};
|
||||
|
||||
export let scope = 'openid profile email';
|
||||
|
||||
|
|
@ -118,6 +119,7 @@
|
|||
response_type: 'code',
|
||||
scope,
|
||||
automaticSilentRenew: true,
|
||||
...extraOptions,
|
||||
};
|
||||
|
||||
const userManager = new oidcClient.UserManager(settings);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue