Skip to content

Commit

Permalink
fix: removed hard coded page links
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaba1 committed Dec 5, 2023
1 parent 81feb47 commit e055f0a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-cycles-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@jumba/amplify-nextjs": patch
---

removed hardcoded page links
4 changes: 2 additions & 2 deletions packages/amplify-nextjs/src/auth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,15 +191,15 @@ export function AmplifyAuthProvider({
setAuth((prev) => ({
...prev,
loginSession: data,
redirectUrl: `/auth/reset-password${params ? `?${params}` : ""}`,
redirectUrl: `${authLinks.resetPassword}${params ? `?${params}` : ""}`,
loginCredentials: { username, password },
sessionType: "login",
}));
} else if (data.challengeName === "SMS_MFA") {
setAuth((prev) => ({
...prev,
loginSession: data,
redirectUrl: `/auth/verify${params ? `?${params}` : ""}`,
redirectUrl: `${authLinks.verify}${params ? `?${params}` : ""}`,
loginCredentials: { username, password },
sessionType: "login",
}));
Expand Down

0 comments on commit e055f0a

Please sign in to comment.