mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
fix(ui): avoid replaying social invitation callbacks
- Redirect invited social auth users after backend invitation acceptance - Keep safe callback redirects for non-invitation social auth flows
This commit is contained in:
@@ -46,7 +46,8 @@ export async function GET(req: Request) {
|
||||
const { access, refresh } = data.data.attributes;
|
||||
|
||||
try {
|
||||
const redirectPath = callbackPath;
|
||||
// Invitation tokens are accepted during the social token exchange.
|
||||
const redirectPath = invitationToken ? "/" : callbackPath;
|
||||
const result = await signIn("social-oauth", {
|
||||
accessToken: access,
|
||||
refreshToken: refresh,
|
||||
|
||||
@@ -46,7 +46,8 @@ export async function GET(req: Request) {
|
||||
const { access, refresh } = data.data.attributes;
|
||||
|
||||
try {
|
||||
const redirectPath = callbackPath;
|
||||
// Invitation tokens are accepted during the social token exchange.
|
||||
const redirectPath = invitationToken ? "/" : callbackPath;
|
||||
const result = await signIn("social-oauth", {
|
||||
accessToken: access,
|
||||
refreshToken: refresh,
|
||||
|
||||
Reference in New Issue
Block a user