Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplified configuration of custom login URL [SDK-2264] #268

Merged
merged 5 commits into from
Feb 2, 2021

Conversation

Widcket
Copy link
Contributor

@Widcket Widcket commented Feb 2, 2021

Description

This PR makes it possible to set a custom login URL for the server-side version of withPageAuthRequired with an environment variable. This way, the developer only has to configure it once, instead of in every call site of withPageAuthRequired.

Also, the server-side version of withPageAuthRequired wasn't taking the returnTo parameter that the client-side takes. This was corrected and both versions offer the same public-facing configuration options.

References

Supercedes #253

Testing

  • This change adds test coverage for new/changed/fixed functionality

Checklist

  • I have added documentation for new/changed functionality in this PR or in auth0.com/docs
  • All active GitHub checks for tests, formatting, and security are passing
  • The correct base branch is being used, if not master

@Widcket Widcket added the review:small Small review label Feb 2, 2021
@Widcket Widcket requested a review from a team as a code owner February 2, 2021 03:45
@vercel
Copy link

vercel bot commented Feb 2, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/auth0/nextjs-auth0/pnwjfs5a9
✅ Preview: Canceled

[Deployment for b5514ee canceled]

src/index.ts Outdated Show resolved Hide resolved
tests/index.test.ts Outdated Show resolved Hide resolved
@adamjmcgrath
Copy link
Contributor

Looks good 👍 Just need to figure out a different solution to that special case with the named withPageAuthRequired export

@Widcket Widcket merged commit a2932dc into beta Feb 2, 2021
@Widcket Widcket deleted the feature/custom-login-url branch February 2, 2021 15:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
review:small Small review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants