Commit graph

18 commits

Author SHA1 Message Date
Lee Robinson
4f5b0621c1
Alphabetize auth docs providers. (#34281)
Follow up from https://github.com/vercel/next.js/pull/33029, to prevent bias in ordering.
2022-02-13 00:51:53 +00:00
hackerman
1efa892e97
docs: add Ory vercel example to auth page (#33029)
See also the merged https://github.com/vercel/examples/pull/40

## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2022-02-08 21:59:13 +00:00
Rich Haines
8a1c947df1
Changed data fetching file name to overview to fix meta data title (#33232)
* Changed data fetching file name to overview to fix meta data title

* Update docs/api-reference/data-fetching/get-server-side-props.md

Co-authored-by: Steven <steven@ceriously.com>

* Update manifest and check

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-01-27 09:14:14 -06:00
Tharaka Abeyratne
d866121f04
[docs] Update authentication docs to fix iron-session link. (#33483)
Co-authored-by: Vincent Voyer <vincent@codeagain.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2022-01-21 12:21:23 +01:00
Hannes Bornö
c634d76162
ReferenceError in authentication.md example fixed (#33411)
Before
```jsx
export const getServerSideProps = withSession(async function ({ req, res }) {
  if (!req.session.user) {
    return {
      redirect: {
        destination: '/login',
        permanent: false,
      },
    }
  }

  return {
    props: { user }, // User not defined
  }
})
```
2022-01-17 21:07:53 +00:00
Rich Haines
d291aa9134
Refactor data fetching API docs (#30615)
Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: Balázs Orbán <info@balazsorban.com>
2022-01-12 08:56:51 +01:00
Vincent Voyer
7d82e07df8
docs(auth): fix iron-session example url + API (#31413)
This fixes the iron-session example url from an old url to the new,
always-up-to-date url.

I believe the Next.js team owns the previous url but it's not up-to-date.

This commit also changes req.session.get("user") => req.session.user to reflect
the new API.
2021-11-15 14:49:15 +00:00
Orri Arnarsson
06d4bbbb24
docs: next-iron-session renamed to iron-session (#31292)
## Documentation / Examples

- [x] Make sure the linting passes by running `yarn lint`
2021-11-15 14:12:20 +00:00
Colin Sidoti
713a5aa701
Use new @clerk/nextjs package in with-clerk example, update Next.js authentication docs (#28906)
* Update headings to clarify that we're describing. Add heading for Authentication API Routes

* Start adding API route examples

* Start adding API route examples

* Start adding API route examples

* Start adding API route examples

* auth: Replace clerk packages with @clerk/nextjs

* Add API authentication example to with-clerk

* Fix footer links

* Proofread, ensure consistency

* Update example's props to use new version

* Update example links

* Add rel tag to _blank link

* Obscure the authentication provider in the example

* Replace example

* Reset authentication docs, list Clerk as vendor

* Re-fix typo

* Change sample to example

* Add the example

* Update examples/with-clerk/package.json

Co-authored-by: Lee Robinson <me@leerob.io>

Co-authored-by: Peter Perlepes <p.perlepes@gmail.com>
Co-authored-by: Lee Robinson <me@leerob.io>
2021-09-17 10:54:34 -05:00
Oscar Fuentes
639b4d7d1f
doc: fix typo (#28146)
Given the context of the surrounding sentence, I believe the intention here was to use the word `increasing`. 



## Bug

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes
2021-08-16 02:51:06 +00:00
John Jago
c6ba29da00
docs: use descriptive links instead of "click here" (#25897)
* docs: use descriptive links instead of "click here"

Linking text such as "here" or "click here" is not accessible (and
doesn't look that great either). The best example of why it's better to
use link text that provides context is that some screen readers allow
navigation by links alone. If all links say "click here", then how does
the user know which one to go to?

I tried to make the minimal change necessary to make the link text
descriptive but had to reword a few sentences that didn't read well.

* Apply suggestions from code review

Co-authored-by: Lee Robinson <me@leerob.io>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2021-06-09 13:23:16 -05:00
Lee Robinson
28501c6af4
Update Authentication docs to be an examples list. (#25497)
Replaces https://github.com/vercel/next.js/pull/25485.
2021-05-26 19:06:47 +00:00
Rishabh Poddar
41efb824f2
Docs update: Adds supertokens to 'Bring Your Own Database' section as well + improvements to code structure in example (#23779)
- Since SuperTokens is a self hosted solution, it can be added to 'Bring Your Own Database' as well (in https://nextjs.org/docs/authentication#supertokens)
- Improvements to code structure in the with-supertokens example
2021-04-20 17:23:32 +00:00
Vincent Voyer
1b020e6cd1
docs(authentication): rephrase next-iron-session/next-auth (#23199)
I thought that the current wording was not accurate both for next-iron-session and next-auth.

- next-auth is a full-featured authentication system like passport
- next-iron-session is a session utility

The previous copy was less clear about that and, for example, said you should go for next-iron-session for user/password and next-auth for everything else. Which is not the case. I use next-iron-session with only a Slack login, and you can implement email/password with next-auth.

Hope you like it!

PS: I have no preference between the two, I think they serve a different purpose. I used the two (and authored one).

I used next-auth on https://sourcekarma.vercel.app/
2021-03-18 17:04:58 +00:00
dominicfraser
86ce29b34a
Update authentication.md SSR example (#22641)
There are two examples, one (a) for "Authenticating Statically Generated Pages" and one (b) for "Authenticating Server-Rendered Pages".

(a) uses a sudo `useUser` hook to fetch the user client-side.

It looks like the example for (b) was copied and pasted then edited from (a), but in (b) this `useUser` hook is not used (instead using `req.session.get('user')`).

This PR simply removes the unused import in the (b) example.
2021-03-01 16:44:32 +00:00
NkxxkN
293c243ab7
add-supertokens-to-authentication.md (#22223)
Hey team. This PR is a follow up on https://github.com/vercel/next.js/pull/21384 to add a reference to `with-supertokens` example to authentication doc.
2021-03-01 15:53:17 +00:00
Balázs Orbán
6af69793aa
Point to official next-auth example (#22282)
We would like to maintain a single `next-auth` example under our organization. This PR points readers of the Next.js docs to our repository, instead of `with-next-auth`

Also, as @kriscarle pointed out in https://github.com/nextauthjs/next-auth/issues/1132#issuecomment-772375650, we should maybe only maintain a single example to be able to keep it up-to-date more easily.
2021-02-18 15:39:38 +00:00
Lee Robinson
380afbfba2
Add docs on authentication patterns. (#16277)
Building off [this Slack conversation](https://vercel.slack.com/archives/CGD3XGSD7/p1597329727013900), this PR adds a top-level section to the documentation on authentication patterns.

Please provide any and all comments! A few open thoughts I have:

- ~Should this include code snippets from the related providers or stay very high-level? At what point do we delegate to the examples folder?~ Keep things high level and delegate to examples folder 
- ~Should this include any related cards at the bottom?~ Added to the bottom
- ~Should other places in the documentation link back to here?~ Added link from routing
- Should it be a top-level route, or be underneath advanced?
2020-12-31 08:28:11 +00:00