Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix token refresh flow #2472

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
Please click the button below to authenticate and get access to your data.
</p>
<oc-button size="large" variation="primary" class="oc-login-authorize-button" id="authenticate" @click.native="login()">
<translate>Authorize</translate>
<translate>Login</translate>
</oc-button>
</div>
<div class="oc-login-card-footer">
Expand Down
8 changes: 6 additions & 2 deletions src/pages/oidcCallback.vue
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ export default {
console.warn('OAuth error: ' + this.$route.query.error + ' - ' + this.$route.query.error_description)
return
}
this.callback()
if (this.$route.path === '/oidc-silent-redirect') {
this.signinSilentCallback()
} else {
this.callback()
}
})
},
data () {
Expand All @@ -52,7 +56,7 @@ export default {
...mapGetters(['configuration'])
},
methods: {
...mapActions(['callback'])
...mapActions(['callback', 'signinSilentCallback'])
}
}
</script>
52 changes: 0 additions & 52 deletions src/pages/oidcSilentRedirect.vue

This file was deleted.

3 changes: 1 addition & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Vue from 'vue'
import Router from 'vue-router'
import LoginPage from '../pages/login.vue'
import OidcCallbackPage from '../pages/oidcCallback.vue'
import OidcSilentRedirectPage from '../pages/oidcSilentRedirect.vue'
import AccessDeniedPage from '../pages/accessDenied.vue'
import Account from '../pages/account.vue'

Expand Down Expand Up @@ -31,7 +30,7 @@ const router = new Router({
{
path: '/oidc-silent-redirect',
components: {
fullscreen: OidcSilentRedirectPage
fullscreen: OidcCallbackPage
},
meta: { auth: false, hideHeadbar: true }
},
Expand Down
2 changes: 1 addition & 1 deletion src/services/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export function initVueAuthenticate (config) {
post_logout_redirect_uri: baseUrl,
silent_redirect_uri: baseUrl + 'oidc-silent-redirect.html',
accessTokenExpiringNotificationTime: 10,
automaticSilentRenew: false,
automaticSilentRenew: true,
filterProtocolClaims: true,
loadUserInfo: true,
logLevel: Log.INFO
Expand Down