Marton Langa
5f003105ef
Change redirect status to 302 ( #6562 )
...
As discussed in #6546 , changing redirect status to 302, so the redirect is only temporary
2019-03-07 12:51:45 +01:00
Marton Langa
0a4f0e6356
Fix page not loading with ending the request ( #6546 )
2019-03-07 11:29:25 +01:00
Juan Olvera
80cb91ec87
Add setup to run example with cookie authentication locally ( #6101 )
...
* extract request login from auth
* add clarification that the monorepo is for deploy in Now only and fix typo
* Refactor HOC
- add authorization to HOC
- add displayName to HOC
- remove unnecessary `run`s in local routing
2019-02-11 14:17:43 +01:00
Juan Olvera
798ae043ac
Example with cookie auth ( #5821 )
...
Fixes #153
This is my attempt at https://github.com/zeit/next.js/issues/153
Following @rauchg instructions:
- it uses an authentication helper across pages which returns a token if there's one
- it has session synchronization across tabs
- <strike>I deployed a passwordless backend on `now.sh` (https://with-cookie-api.now.sh , [src](https://github.com/j0lv3r4/next.js-with-cookies-api ))</strike> The backend is included in the repository and you can deploy everything together by running `now`
Also, from reviewing other PRs, I made sure to:
- use [isomorphic-unfetch](https://www.npmjs.com/package/isomorphic-unfetch ).
- use [next-cookies](https://www.npmjs.com/package/next-cookies ).
Here's a little demo:
![GIF](https://i.imgur.com/067Ph56.gif )
2018-12-14 23:05:54 +01:00