Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
ac7a13bc
Commit
ac7a13bc
authored
Oct 22, 2019
by
jackie / Andrea Ida Malkah Klaura
Browse files
FIX: token renewal, logger and self/this issue in App.vue
parent
f32bef02
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/App.vue
View file @
ac7a13bc
...
...
@@ -88,12 +88,12 @@ export default {
oidc
.
Log
.
logger
=
console
let
self
=
this
this
.
oidcmgr
.
events
.
addAccessTokenExpiring
(
function
()
{
this
.
$log
.
debug
(
'
starting silent access_token renewal
'
)
console
.
log
(
'
Debug info:
starting silent access_token renewal
'
)
self
.
oidcmgr
.
signinSilent
().
then
(
function
(
user
)
{
self
.
user
.
access_token
=
user
.
access_token
this
.
$log
.
debu
g
(
self
.
user
.
access_token
)
console
.
lo
g
(
self
.
user
.
access_token
)
}).
catch
(
function
(
err
)
{
this
.
$log
.
debu
g
(
err
)
console
.
lo
g
(
err
)
alert
(
'
Your OpenID access token could not be renewed automatically.
\n
'
+
'
You will be logged out in
'
+
process
.
env
.
VUE_APP_API_STEERING_OIDC_EXPIRE_NOTIFICATION
+
'
seconds.
'
)
})
...
...
@@ -111,20 +111,20 @@ export default {
},
methods
:
{
signIn
()
{
this
.
oidcmgr
.
signinRedirect
().
catch
(
function
(
err
)
{
this
.
oidcmgr
.
signinRedirect
().
catch
(
err
=>
{
alert
(
'
Error: something went wrong when signing in. See console for details.
'
)
this
.
$log
.
error
(
err
)
})
},
signOut
()
{
let
self
=
this
this
.
oidcmgr
.
signoutRedirect
().
then
(
function
(
resp
)
{
self
.
user
.
logged_in
=
false
this
.
oidcmgr
.
signoutRedirect
().
then
(
resp
=>
{
this
.
user
.
logged_in
=
false
this
.
$log
.
debug
(
'
signed out
'
,
resp
)
}).
catch
(
function
(
err
)
{
}).
catch
(
err
=>
{
this
.
$log
.
error
(
err
)
alert
(
'
Error: something went wrong when logging out. See console for details.
'
)
})
console
.
log
(
'
3
'
)
},
getSteeringUser
()
{
axios
.
get
(
process
.
env
.
VUE_APP_API_STEERING
+
'
users/
'
,
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment