Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
036ee565
Commit
036ee565
authored
Mar 23, 2022
by
Paul Gascou-Vaillancourt
Committed by
Paul Gascou-Vaillancourt
Mar 25, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle username verification errors
parent
33b095e4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
9 deletions
+13
-9
ee/app/assets/javascripts/arkose_labs/components/sign_in_arkose_app.vue
...javascripts/arkose_labs/components/sign_in_arkose_app.vue
+13
-9
No files found.
ee/app/assets/javascripts/arkose_labs/components/sign_in_arkose_app.vue
View file @
036ee565
...
...
@@ -44,7 +44,7 @@ export default {
},
data
()
{
return
{
isVisible
:
false
,
arkoseLabsIframeShown
:
false
,
showArkoseNeededError
:
false
,
showArkoseFailure
:
false
,
username
:
''
,
...
...
@@ -56,6 +56,9 @@ export default {
};
},
computed
:
{
isVisible
()
{
return
this
.
arkoseLabsIframeShown
||
this
.
showErrorContainer
;
},
showErrorContainer
()
{
return
this
.
showArkoseNeededError
||
this
.
showArkoseFailure
;
},
...
...
@@ -72,8 +75,8 @@ export default {
this
.
username
=
this
.
getUsernameValue
();
},
methods
:
{
show
()
{
this
.
isVisible
=
true
;
onArkoseLabsIframeShown
()
{
this
.
arkoseLabsIframeShown
=
true
;
},
hideErrors
()
{
this
.
showArkoseNeededError
=
false
;
...
...
@@ -109,11 +112,12 @@ export default {
await
this
.
initArkoseLabs
();
}
}
catch
{
// API call failed, do not initialize Arkose challenge.
// Button will be reset in `finally` block.
// TODO - what if initArkoseLabs failed?
// TODO - Do we get any error objects we should console log?
}
catch
(
e
)
{
// If the requests fails with a 404 code, we can fail silently.
// We show a generic error message for any other failure.
if
(
e
.
response
?.
status
!==
404
)
{
this
.
handleArkoseLabsFailure
();
}
}
finally
{
this
.
isLoading
=
false
;
}
...
...
@@ -124,7 +128,7 @@ export default {
enforcement
.
setConfig
({
mode
:
'
inline
'
,
selector
:
`.
${
this
.
arkoseContainerClass
}
`
,
onShown
:
this
.
show
,
onShown
:
this
.
onArkoseLabsIframeShown
,
onCompleted
:
this
.
passArkoseLabsChallenge
,
onError
:
this
.
handleArkoseLabsFailure
,
});
...
...
Write
Preview
Markdown
is supported
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