Skip to content

Commit

Permalink
fixes embedding docs
Browse files Browse the repository at this point in the history
  • Loading branch information
rishabhpoddar committed May 17, 2024
1 parent f032036 commit 1117413
Show file tree
Hide file tree
Showing 5 changed files with 186 additions and 96 deletions.
54 changes: 36 additions & 18 deletions v2/emailpassword/common-customizations/embed-sign-in-up-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -328,11 +327,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -404,11 +402,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -492,7 +489,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -571,7 +575,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -652,7 +663,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down
54 changes: 36 additions & 18 deletions v2/passwordless/common-customizations/embed-sign-in-up-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -261,11 +261,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -336,11 +335,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -413,11 +411,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -502,7 +499,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -582,7 +586,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -664,7 +675,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down
54 changes: 36 additions & 18 deletions v2/thirdparty/common-customizations/embed-sign-in-up-form.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -257,11 +257,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -331,11 +330,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -407,11 +405,10 @@ SuperTokens.init({
// ...
],
// highlight-start
async getRedirectionURL(context) {
// The user will be taken to this path when they need to login.
if (context.action === "TO_AUTH") {
return "/auth"; // return the path where you are rendering the Auth UI
};
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});
Expand Down Expand Up @@ -495,7 +492,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -574,7 +578,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down Expand Up @@ -655,7 +666,14 @@ SuperTokens.init({
// ...
}),
// ...
]
],
// highlight-start
getRedirectionURL: async (context) => {
if (context.action === "SUCCESS") {
return null; // this will not navigate the user away after successful login
}
},
// highlight-end
});

function AuthPopup() {
Expand Down
Loading

0 comments on commit 1117413

Please sign in to comment.