mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
30 lines
673 B
JavaScript
30 lines
673 B
JavaScript
|
import React from 'react'
|
||
|
import Layout from '../components/layout'
|
||
|
|
||
|
const Home = props => (
|
||
|
<Layout>
|
||
|
<h1>Cookie-based authentication example</h1>
|
||
|
|
||
|
<p>Steps to test the functionality:</p>
|
||
|
|
||
|
<ol>
|
||
|
<li>Click login and enter your GitHub username.</li>
|
||
|
<li>
|
||
|
Click home and click profile again, notice how your session is being
|
||
|
used through a token stored in a cookie.
|
||
|
</li>
|
||
|
<li>
|
||
|
Click logout and try to go to profile again. You'll get redirected to
|
||
|
the `/login` route.
|
||
|
</li>
|
||
|
</ol>
|
||
|
<style jsx>{`
|
||
|
li {
|
||
|
margin-bottom: 0.5rem;
|
||
|
}
|
||
|
`}</style>
|
||
|
</Layout>
|
||
|
)
|
||
|
|
||
|
export default Home
|