1
0
forked from baron/baron-sso

링크로 로그인하기 구현 완료

This commit is contained in:
Lectom C Han
2026-01-29 09:57:36 +09:00
parent 8faa08e377
commit 209314fea7
4 changed files with 107 additions and 17 deletions

View File

@@ -41,17 +41,24 @@ class AuthProxyService {
}
}
static Future<Map<String, dynamic>> initEnchantedLink(String loginId, {String? method}) async {
static Future<Map<String, dynamic>> initEnchantedLink(
String loginId, {
String? method,
bool? codeOnly,
}) async {
final url = Uri.parse('$_baseUrl/api/v1/auth/enchanted-link/init');
final userfrontUrl = _envOrDefault('USERFRONT_URL', 'http://sso.hmac.kr');
final body = {
final body = <String, dynamic>{
'loginId': loginId,
'uri': userfrontUrl,
};
if (method != null) {
body['method'] = method;
}
if (codeOnly == true) {
body['codeOnly'] = true;
}
final response = await http.post(
url,