sdyl405w4: Remove the sign-out feature and the Minnect revoke call
This commit is contained in:
@@ -196,27 +196,6 @@ export async function refreshProfileTokens(
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Revoke a profile refresh token on sign-out.
|
||||
* `POST /api/v4/auth/revoke-token` with `{ refreshToken }`. Best-effort: any
|
||||
* error (network or non-200) is swallowed so that sign-out still succeeds.
|
||||
*/
|
||||
export async function revokeToken(
|
||||
refreshToken: string,
|
||||
options: LoginOptions = {},
|
||||
): Promise<void> {
|
||||
const doFetch = options.fetchImpl ?? fetch;
|
||||
try {
|
||||
await doFetch(`${PROFILES_BASE_URL}/api/v4/auth/revoke-token`, {
|
||||
method: "POST",
|
||||
headers: jsonHeaders(),
|
||||
body: JSON.stringify({ refreshToken }),
|
||||
});
|
||||
} catch {
|
||||
// Sign-out still succeeds if revoke fails (spec, "Sign out").
|
||||
}
|
||||
}
|
||||
|
||||
/** `GET /api/v1/auth/me` on the feed host. Returns data.id, or null on any failure. */
|
||||
async function fetchFeedUserId(feedToken: string, doFetch: typeof fetch): Promise<string | null> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user