Skip to content

Commit e3368ab

Browse files
committed
docs review
1 parent c13bee6 commit e3368ab

File tree

4 files changed

+9
-44
lines changed

4 files changed

+9
-44
lines changed

docs/guides/development/custom-flows/authentication/legacy/email-password.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,9 @@ This guide will walk you through how to build a custom email/password sign-up an
9494
session: signUpAttempt.createdSessionId,
9595
navigate: async ({ session, decorateUrl }) => {
9696
if (session?.currentTask) {
97-
// Check for session tasks and navigate to custom UI to help users resolve them
98-
// See https://clerk.com/docs/guides/development/custom-flows/authentication#session-tasks
97+
// Handle session tasks
98+
// See https://clerk.com/docs/guides/development/custom-flows/authentication/session-tasks
9999
console.log(session?.currentTask)
100-
const tasksUrl = decorateUrl('/sign-up/tasks')
101-
if (tasksUrl.startsWith('http')) {
102-
window.location.href = tasksUrl
103-
} else {
104-
router.push(tasksUrl)
105-
}
106-
return
107100
}
108101

109102
const url = decorateUrl('/')

docs/guides/development/custom-flows/authentication/legacy/legal-acceptance.mdx

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,9 @@ export default function Page() {
8484
session: signUpAttempt.createdSessionId,
8585
navigate: async ({ session, decorateUrl }) => {
8686
if (session?.currentTask) {
87-
// Check for session tasks and navigate to custom UI to help users resolve them
88-
// See https://clerk.com/docs/guides/development/custom-flows/authentication#session-tasks
87+
// Handle session tasks
88+
// See https://clerk.com/docs/guides/development/custom-flows/authentication/session-tasks
8989
console.log(session?.currentTask)
90-
const url = decorateUrl('/sign-up/tasks')
91-
if (url.startsWith('http')) {
92-
window.location.href = url
93-
} else {
94-
router.push(url)
95-
}
96-
return
9790
}
9891

9992
const url = decorateUrl('/')

docs/guides/development/custom-flows/authentication/oauth-connections.mdx

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -268,18 +268,11 @@ You must configure your application instance through the Clerk Dashboard for the
268268
if (createdSessionId) {
269269
setActive!({
270270
session: createdSessionId,
271-
// Check for session tasks and navigate to custom UI to help users resolve them
272-
// See https://clerk.com/docs/guides/development/custom-flows/authentication#session-tasks
271+
// Handle session tasks
272+
// See https://clerk.com/docs/guides/development/custom-flows/authentication/session-tasks
273273
navigate: async ({ session, decorateUrl }) => {
274274
if (session?.currentTask) {
275275
console.log(session?.currentTask)
276-
const url = decorateUrl('/sign-in/tasks')
277-
if (url.startsWith('http')) {
278-
window.location.href = url
279-
} else {
280-
router.push(url)
281-
}
282-
return
283276
}
284277

285278
const url = decorateUrl('/')
@@ -523,16 +516,9 @@ With OAuth flows, it's common for users to try to _sign in_ with an OAuth provid
523516
await signUp.finalize({
524517
navigate: async ({ session, decorateUrl }) => {
525518
if (session?.currentTask) {
526-
// Check for tasks and navigate to custom UI to help users resolve them
527-
// See https://clerk.com/docs/guides/development/custom-flows/authentication#session-tasks
519+
// Handle session tasks
520+
// See https://clerk.com/docs/guides/development/custom-flows/authentication/session-tasks
528521
console.log(session?.currentTask)
529-
const url = decorateUrl('/sign-in/tasks')
530-
if (url.startsWith('http')) {
531-
window.location.href = url
532-
} else {
533-
router.push(url)
534-
}
535-
return
536522
}
537523

538524
const url = decorateUrl('/')

docs/guides/development/custom-flows/authentication/session-tasks.mdx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,10 @@ In the authentication custom flows, such as the [email/password custom flow](/do
5050
await setActive({
5151
session: signInAttempt.createdSessionId,
5252
navigate: async ({ session, decorateUrl }) => {
53-
// Check for tasks and navigate to custom UI to help users resolve them
53+
// Handle session tasks
5454
// See https://clerk.com/docs/guides/development/custom-flows/authentication/session-tasks
5555
if (session?.currentTask) {
5656
console.log(session?.currentTask)
57-
const url = decorateUrl(`/session-tasks/${session?.currentTask.key}`)
58-
if (url.startsWith('http')) {
59-
window.location.href = url
60-
} else {
61-
router.push(url)
62-
}
63-
return
6457
}
6558

6659
const url = decorateUrl('/')

0 commit comments

Comments
 (0)