Android Apple 로그인을 Firebase 웹 흐름으로
This commit is contained in:
@@ -501,25 +501,6 @@ Future<T> untilAbandoned<T>(
|
||||
});
|
||||
}
|
||||
|
||||
/// Apple Service ID와 callback URL은 비밀값이 아니지만 환경별 값이다.
|
||||
/// 저장소에 임시 상수를 박지 않고 빌드 시 `--dart-define`으로만 받는다.
|
||||
apple.WebAuthenticationOptions? appleWebAuthenticationOptionsFromEnvironment() {
|
||||
const clientId = String.fromEnvironment('FANUZU_APPLE_SERVICE_ID');
|
||||
const redirect = String.fromEnvironment('FANUZU_APPLE_REDIRECT_URI');
|
||||
if (clientId.isEmpty || redirect.isEmpty) return null;
|
||||
|
||||
final redirectUri = Uri.tryParse(redirect);
|
||||
if (redirectUri == null ||
|
||||
!redirectUri.hasScheme ||
|
||||
!redirectUri.hasAuthority) {
|
||||
return null;
|
||||
}
|
||||
return apple.WebAuthenticationOptions(
|
||||
clientId: clientId,
|
||||
redirectUri: redirectUri,
|
||||
);
|
||||
}
|
||||
|
||||
AuthAccount _toAccount(fb.User? user, SocialProvider provider) => AuthAccount(
|
||||
uid: user?.uid ?? '',
|
||||
provider: provider,
|
||||
|
||||
Reference in New Issue
Block a user