mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
feat(server): improve oidc compatibility (#14686)
fix #13938 fix #14683 fix #14532 #### PR Dependency Tree * **PR #14686** 👈 This tree was auto-generated by [Charcoal](https://github.com/danerwilliams/charcoal) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Flexible OIDC claim mapping for email/name, automatic OIDC discovery retry with exponential backoff, and explicit OAuth flow modes (popup vs redirect) propagated through the auth flow. * **Bug Fixes** * Stricter OIDC email validation, clearer error messages listing attempted claim candidates, and improved callback redirect handling for various flow scenarios. * **Tests** * Added unit tests covering OIDC behaviors, backoff scheduler/promise utilities, and frontend OAuth flow parsing/redirect logic. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -73,11 +73,13 @@ export function OAuth({ redirectUrl }: { redirectUrl?: string }) {
|
||||
params.set('redirect_uri', redirectUrl);
|
||||
}
|
||||
|
||||
params.set('flow', 'redirect');
|
||||
|
||||
const oauthUrl =
|
||||
serverService.server.baseUrl +
|
||||
`/oauth/login?${params.toString()}`;
|
||||
|
||||
urlService.openPopupWindow(oauthUrl);
|
||||
urlService.openExternal(oauthUrl);
|
||||
};
|
||||
|
||||
const ret = open();
|
||||
|
||||
Reference in New Issue
Block a user