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

feat: make origin configurable at runtime #140

Merged
merged 6 commits into from
Jan 5, 2023
Merged

Conversation

BracketJohn
Copy link
Contributor

This PR:

  • makes the origin configurable at runtime via AUTH_ORIGIN
  • adds documentation to explain:
    • how to set the origin at build time
    • how to setup your own environment variable to configure the secret at build time

@@ -18,6 +18,11 @@ let preparedAuthHandler: ReturnType<typeof eventHandler> | undefined
let usedSecret: string | undefined
const SUPPORTED_ACTIONS: NextAuthAction[] = ['providers', 'session', 'csrf', 'signin', 'signout', 'callback', 'verify-request', 'error', '_log']

export const ERROR_MESSAGES = {
Copy link
Member

@zoey-kaiser zoey-kaiser Jan 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One feedback I got from the streamer using nuxt-auth for the first time was that our error messages were pretty long and spammed the console.

Do we maybe want to shorten them here and have a dedicated part of our docs list fixes for each error? Then we can link that page in the error message and go more into detail into what the issue is?

eg:

https://sidebase/nuxt-auth/errors/no-secret

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super idea! I've added it (:

@BracketJohn BracketJohn merged commit e7a3414 into main Jan 5, 2023
@BracketJohn BracketJohn deleted the add_origin_env_var branch January 5, 2023 08:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants