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

Update suggested ways of securing pages and API routes #3973

Closed
balazsorban44 opened this issue Feb 14, 2022 · 8 comments
Closed

Update suggested ways of securing pages and API routes #3973

balazsorban44 opened this issue Feb 14, 2022 · 8 comments
Assignees
Labels
documentation Relates to documentation good first issue Good issue to take for first time contributors

Comments

@balazsorban44
Copy link
Member

balazsorban44 commented Feb 14, 2022

In vercel/next.js#34316 (comment) I concluded that getInitialProps really does not play well with our auth model. There are simply much better solutions for this now.

We should discourage the usage of it entirely.

https://next-auth.js.org/tutorials/securing-pages-and-api-routes should be updated to also mention Middleware support and finally decide how and where we should document getServerSession (#1535)

@balazsorban44 balazsorban44 added documentation Relates to documentation good first issue Good issue to take for first time contributors labels Feb 14, 2022
@balazsorban44 balazsorban44 changed the title Reduce the mention of getInitialProps Update suggested ways of securing pages and API routes Feb 14, 2022
@ndom91
Copy link
Member

ndom91 commented Feb 15, 2022

In terms of where we should document getServerSession, I feel like in the client page by where getSession is would make a lot of sense, no?

I'd also link where we say "Client Side: yes, Server Side: yes" under getSession, to getServerSession instead of "Server side: yes" under getSession. Know what I mean?

@balazsorban44
Copy link
Member Author

I'm not really sure actually. I want the Client page to go away mostly, or document how a framework-specific client should be implemented (similar to how we have the REST API docs).

getServerSession is Next.js specific, so I might put it under https://next-auth.js.org/configuration/nextjs probably.

@ubbe-xyz ubbe-xyz self-assigned this Feb 28, 2022
@ndom91
Copy link
Member

ndom91 commented Mar 15, 2022

I think we can close this issue. We've got these two PRs out:

What do you think?

@imtheaman
Copy link

i think documentation structure need a refresh. it's designed in the same old school fashion.

@ndom91
Copy link
Member

ndom91 commented Apr 16, 2022

@urtheaman we're always open for suggestions - what were you thinking specifically?

@imtheaman
Copy link

@urtheaman we're always open for suggestions - what were you thinking specifically?

now it's well structured. previously i had to switch b/w tutorials and docs.

@ndom91
Copy link
Member

ndom91 commented Apr 29, 2022

Migrating away from the Client page in favor of individua client pages (i.e. Next.js, Svelte, etc.). Closing this issue now 👍

@ndom91 ndom91 closed this as completed Apr 29, 2022
@ifonefox
Copy link

ifonefox commented May 6, 2022

Now that this issue is closed, what's going to happen two the 2 PRs mentioned earlier? (#4116 and #3982)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Relates to documentation good first issue Good issue to take for first time contributors
Projects
None yet
Development

No branches or pull requests

5 participants