Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Nicolas PERNOUD
Vestibule
Commits
d3bbc89f
Commit
d3bbc89f
authored
Jun 15, 2021
by
Nicolas Pernoud
Browse files
fix: redirection loop after cookie expires
parent
3d49f59a
Pipeline
#14499
passed with stages
in 2 minutes and 34 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
web/components/login/login.js
View file @
d3bbc89f
...
...
@@ -97,8 +97,7 @@ export class Login {
if
(
response
.
status
!==
200
)
{
throw
new
Error
(
`Login error (status
${
response
.
status
}
)`
);
}
const
newUser
=
await
Auth
.
GetUser
();
Object
.
assign
(
this
.
user
,
newUser
);
await
Auth
.
GetUser
();
location
.
hash
=
"
#davs
"
;
this
.
navbar
.
CreateMenu
();
}
catch
(
e
)
{
...
...
web/index.html
View file @
d3bbc89f
...
...
@@ -32,7 +32,7 @@
<div
class=
"navbar-brand"
>
<div
class=
"navbar-item"
>
<a
class=
"button is-primary is-rounded is-outlined"
href=
"https://www.github.com/nicolaspernoud/Vestibule"
target=
"_blank"
rel=
"noopener noreferrer"
>
<span>
4.5.1
2
</span>
<span>
4.5.1
3
</span>
<span
class=
"icon"
>
<svg
class=
"svg-inline--fa fa-github fa-w-16"
...
...
web/services/auth/auth.js
View file @
d3bbc89f
...
...
@@ -14,7 +14,7 @@ export async function GetUser() {
if
(
response
.
status
!==
200
)
{
throw
new
Error
(
`Not authenticated (status
${
response
.
status
}
)`
);
}
user
=
await
response
.
json
();
Object
.
assign
(
user
,
await
response
.
json
()
)
;
// Redirect to original subdomain if login was displayed after an authentication error on the original subdomain
try
{
const
redirectAfterLogin
=
document
.
cookie
...
...
@@ -33,5 +33,7 @@ export async function GetUser() {
}
export
function
DeleteUser
()
{
user
=
{};
Object
.
keys
(
user
).
forEach
((
key
)
=>
{
delete
user
[
key
];
});
}
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