mirror of
https://github.com/TECHNOFAB11/svelte-oidc.git
synced 2025-12-11 23:50:06 +01:00
chore: code style fixes and documentation updates.
This commit is contained in:
parent
77fd4d289d
commit
08dc5a96cd
4 changed files with 19 additions and 9 deletions
|
|
@ -38,7 +38,7 @@ import {
|
|||
<tbody>
|
||||
<tr><td>isLoading</td><td>{$isLoading}</td></tr>
|
||||
<tr><td>isAuthenticated</td><td>{$isAuthenticated}</td></tr>
|
||||
<tr><td>accessToken</td><td>{$accessToken}</td></tr>
|
||||
<tr><td>accessToken</td><td style="word-break: break-all;">{$accessToken}</td></tr>
|
||||
<tr><td>idToken</td><td style="word-break: break-all;">{$idToken}</td></tr>
|
||||
<tr><td>userInfo</td><td><Highlight language={json} code={JSON.stringify($userInfo, null, 2) || ''} /></td></tr>
|
||||
<tr><td>authError</td><td>{$authError}</td></tr>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
isAuthenticated,
|
||||
isLoading,
|
||||
authError,
|
||||
userInfo
|
||||
userInfo,
|
||||
} from './oidc';
|
||||
|
||||
// props.
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ export async function login(preserveRoute = true, callback_url = null) {
|
|||
* @param {string} logout_url - specify the url to return to after login.
|
||||
*/
|
||||
export async function logout(logout_url = null) {
|
||||
// getContext(OIDC_CONTEXT_CLIENT_PROMISE) returns a promise.
|
||||
const oidc = await getContext(OIDC_CONTEXT_CLIENT_PROMISE)
|
||||
const returnTo = logout_url || getContext(OIDC_CONTEXT_POST_LOGOUT_REDIRECT_URI) || window.location.href;
|
||||
accessToken.set('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue