Replies: 1 comment 1 reply
-
This has been answered before. See #947 (comment) We have been playing with the thought of a config file of sorts, but we have to think more about how to do it right. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I read in the Next documentation that calling custom apis from getServerSideProps is not recommended :
This is normal because server-side we already have access to everything a custom api would have access to, so we can call the functions directly without making some extra fetches on localhost.
I supposed that the issue is that the configuration of next-auth is in the file /pages/api/auth/[...nextauth].js, so the configuration becomes available only for the api routes.
My suggestion would be to have for example a config file at root
next-auth.config.js
or a file that exposes an instance maybelib/next-auth.js
, and then we could use this instance directly :I am not sure maybe I am missing something.
What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions