feat(core): improve login flow (#15219)
#### PR Dependency Tree * **PR #15219** 👈 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** * Added secure, automatic auth session token refresh and request replay for expired-token responses across Android, iOS, and Electron. * Updated sign-in flows to manage sessions without returning tokens to the app layer. * Added “Devices” management UI with sign out per device and sign out all. * Enabled support for both Hashcash and Turnstile captcha providers. * **Bug Fixes** * Improved refresh de-duplication, inflight cancellation/clear behavior, and recovery from corrupted/invalid sessions. * **Tests** * Expanded auth-session, refresh/revoke, and replay coverage (Electron unit tests, Android instrumentation tests, iOS auth date parser tests). * **Chores** * Removed CAPTCHA site key from build-time configuration and adjusted CI test execution. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -11,12 +11,12 @@
|
||||
"fa": 90,
|
||||
"fr": 94,
|
||||
"hi": 1,
|
||||
"it": 92,
|
||||
"it": 91,
|
||||
"ja": 90,
|
||||
"kk": 98,
|
||||
"ko": 91,
|
||||
"nb-NO": 45,
|
||||
"pl": 92,
|
||||
"pl": 91,
|
||||
"pt-BR": 90,
|
||||
"ru": 92,
|
||||
"sv-SE": 90,
|
||||
|
||||
@@ -9036,6 +9036,58 @@ export function useAFFiNEI18N(): {
|
||||
* `Add icon`
|
||||
*/
|
||||
["com.affine.docIconPicker.placeholder"](): string;
|
||||
/**
|
||||
* `Devices`
|
||||
*/
|
||||
["com.affine.settings.devices.title"](): string;
|
||||
/**
|
||||
* `Devices with an active sign-in session`
|
||||
*/
|
||||
["com.affine.settings.devices.description"](): string;
|
||||
/**
|
||||
* `current`
|
||||
*/
|
||||
["com.affine.settings.devices.current"](): string;
|
||||
/**
|
||||
* `Last used {{time}}`
|
||||
*/
|
||||
["com.affine.settings.devices.last-used"](options: {
|
||||
readonly time: string;
|
||||
}): string;
|
||||
/**
|
||||
* `Loading…`
|
||||
*/
|
||||
["com.affine.settings.devices.loading"](): string;
|
||||
/**
|
||||
* `Sign out`
|
||||
*/
|
||||
["com.affine.settings.devices.sign-out"](): string;
|
||||
/**
|
||||
* `Sign out all devices`
|
||||
*/
|
||||
["com.affine.settings.devices.sign-out-all"](): string;
|
||||
/**
|
||||
* `Sign out {{device}}?`
|
||||
*/
|
||||
["com.affine.settings.devices.confirm"](options: {
|
||||
readonly device: string;
|
||||
}): string;
|
||||
/**
|
||||
* `Sign out every device?`
|
||||
*/
|
||||
["com.affine.settings.devices.confirm-all"](): string;
|
||||
/**
|
||||
* `Failed to load devices`
|
||||
*/
|
||||
["com.affine.settings.devices.load-failed"](): string;
|
||||
/**
|
||||
* `Failed to sign out device`
|
||||
*/
|
||||
["com.affine.settings.devices.sign-out-failed"](): string;
|
||||
/**
|
||||
* `Failed to sign out devices`
|
||||
*/
|
||||
["com.affine.settings.devices.sign-out-all-failed"](): string;
|
||||
/**
|
||||
* `An internal error occurred.`
|
||||
*/
|
||||
|
||||
@@ -2262,6 +2262,18 @@
|
||||
"com.affine.context-menu.paste": "Paste",
|
||||
"com.affine.context-menu.cut": "Cut",
|
||||
"com.affine.docIconPicker.placeholder": "Add icon",
|
||||
"com.affine.settings.devices.title": "Devices",
|
||||
"com.affine.settings.devices.description": "Devices with an active sign-in session",
|
||||
"com.affine.settings.devices.current": "current",
|
||||
"com.affine.settings.devices.last-used": "Last used {{time}}",
|
||||
"com.affine.settings.devices.loading": "Loading…",
|
||||
"com.affine.settings.devices.sign-out": "Sign out",
|
||||
"com.affine.settings.devices.sign-out-all": "Sign out all devices",
|
||||
"com.affine.settings.devices.confirm": "Sign out {{device}}?",
|
||||
"com.affine.settings.devices.confirm-all": "Sign out every device?",
|
||||
"com.affine.settings.devices.load-failed": "Failed to load devices",
|
||||
"com.affine.settings.devices.sign-out-failed": "Failed to sign out device",
|
||||
"com.affine.settings.devices.sign-out-all-failed": "Failed to sign out devices",
|
||||
"error.INTERNAL_SERVER_ERROR": "An internal error occurred.",
|
||||
"error.NETWORK_ERROR": "Network error.",
|
||||
"error.TOO_MANY_REQUEST": "Too many requests.",
|
||||
|
||||
Reference in New Issue
Block a user