mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00:00
refactor(mobile): use startOAuth and server features flags (#6155)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
This commit is contained in:
parent
13ba83dce6
commit
2aaf941dda
5 changed files with 59 additions and 33 deletions
|
|
@ -11,15 +11,16 @@ class OAuthService {
|
|||
final log = Logger('OAuthService');
|
||||
OAuthService(this._apiService);
|
||||
|
||||
Future<OAuthConfigResponseDto?> getOAuthServerConfig(
|
||||
Future<String?> getOAuthServerUrl(
|
||||
String serverUrl,
|
||||
) async {
|
||||
// Resolve API server endpoint from user provided serverUrl
|
||||
await _apiService.resolveAndSetEndpoint(serverUrl);
|
||||
|
||||
return await _apiService.oAuthApi.generateOAuthConfig(
|
||||
final dto = await _apiService.oAuthApi.startOAuth(
|
||||
OAuthConfigDto(redirectUri: '$callbackUrlScheme:/'),
|
||||
);
|
||||
return dto?.url;
|
||||
}
|
||||
|
||||
Future<LoginResponseDto?> oAuthLogin(String oauthUrl) async {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue