Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/plugins/cross-domain/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,13 @@ export const crossDomain = ({ siteUrl }: { siteUrl: string }) => {
// Mostly copied from the one-time-token plugin
const session = ctx.context.newSession;
if (!session) {
// linkSocial callbacks have no newSession — the user is already
// signed in. Follow the provider redirect without the
// one-time-token flow instead of dead-ending with an error.
const redirectTo = ctx.context.responseHeaders?.get("location");
if (redirectTo) {
throw ctx.redirect(redirectTo);
}
ctx.context.logger.error("No session found");
return;
}
Expand Down