Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
circles-android
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Circles
circles-android
Commits
4ddbc57b
Commit
4ddbc57b
authored
1 year ago
by
Taras
Browse files
Options
Downloads
Patches
Plain Diff
Clean up get login stages
parent
3821acff
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
auth/src/main/java/org/futo/circles/auth/feature/log_in/LoginDataSource.kt
+2
-6
2 additions, 6 deletions
...a/org/futo/circles/auth/feature/log_in/LoginDataSource.kt
with
2 additions
and
6 deletions
auth/src/main/java/org/futo/circles/auth/feature/log_in/LoginDataSource.kt
+
2
−
6
View file @
4ddbc57b
...
...
@@ -38,13 +38,9 @@ class LoginDataSource @Inject constructor(
val
homeServerConfig
=
buildHomeServerConfigFromDomain
(
domain
)
val
supportedLoginMethods
=
authService
.
getLoginFlow
(
homeServerConfig
).
supportedLoginTypes
return
if
(
supportedLoginMethods
.
isEmpty
())
{
getCircleLoginStages
(
userName
,
domain
)
}
else
if
(
isPasswordLogin
(
supportedLoginMethods
))
{
return
if
(
isPasswordLogin
(
supportedLoginMethods
))
listOf
(
Stage
.
Other
(
true
,
DIRECT_LOGIN_PASSWORD_TYPE
,
null
))
}
else
{
throw
IllegalArgumentException
(
context
.
getString
(
R
.
string
.
unsupported_login_method
))
}
else
getCircleLoginStages
(
userName
,
domain
)
}
private
fun
isPasswordLogin
(
methods
:
List
<
String
>)
=
methods
.
contains
(
LOGIN_PASSWORD_TYPE
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment