chore: code style fixes and documentation updates.

This commit is contained in:
Darrel O'Pry 2020-06-04 03:22:48 -04:00
parent 77fd4d289d
commit 08dc5a96cd
4 changed files with 19 additions and 9 deletions

View file

@ -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>

View file

@ -11,7 +11,7 @@
isAuthenticated,
isLoading,
authError,
userInfo
userInfo,
} from './oidc';
// props.

View file

@ -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('');