1
0
forked from baron/baron-sso

Align RP auto login launch behavior

This commit is contained in:
2026-04-30 16:36:40 +09:00
parent 28a440734c
commit d16f6cdcb4
7 changed files with 76 additions and 21 deletions

View File

@@ -43,22 +43,36 @@ void main() {
expect(rp.autoLoginUrl, 'https://example.com/login?auto=1');
});
test('자동 로그인 지원 앱은 initUrl을 우선 진입 URL로 사용한다', () {
test('자동 로그인 지원 앱은 autoLoginUrl을 우선 진입 URL로 사용한다', () {
final launchUrl = resolveLinkedRpLaunchUrl(
_linkedRp(
status: 'active',
url: 'https://example.com',
initUrl: 'https://sso.example.com/oidc/oauth2/auth?client_id=client-1',
autoLoginSupported: true,
autoLoginUrl: 'https://example.com/login?auto=1',
),
);
expect(
launchUrl,
'https://sso.example.com/oidc/oauth2/auth?client_id=client-1',
'https://example.com/login?auto=1',
);
});
test('자동 로그인 지원 앱은 autoLoginUrl이 없으면 initUrl로 폴백한다', () {
final launchUrl = resolveLinkedRpLaunchUrl(
_linkedRp(
status: 'active',
url: 'https://example.com',
initUrl: 'https://example.com/login?auto=1',
autoLoginSupported: true,
),
);
expect(launchUrl, 'https://example.com/login?auto=1');
});
test('자동 로그인 미지원 앱은 initUrl이 있어도 기존 url로 폴백한다', () {
final launchUrl = resolveLinkedRpLaunchUrl(
_linkedRp(