rsnext/examples/with-magic/pages/profile.js
Sean Li 91adb8661d
Add example with Magic authentication (#11810)
* Add example with Magic and Passport.js

* Tweaked wording on README

* Fixed lint error

* Fixed prettier error

* Update examples/magic/README.md

Removed Download manually section from README

Co-Authored-By: Joe Haddad <timer150@gmail.com>

* Removed dependency on passport and express + cleanup

* Changed ZEIT brand to Vercel

* Updated readme instructions and secrets

* Renamed example

* Changed db comment

Co-authored-by: Joe Haddad <timer150@gmail.com>
Co-authored-by: Luis Alvarez <luis@zeit.co>
2020-04-22 18:15:12 -05:00

20 lines
380 B
JavaScript

import { useUser } from '../lib/hooks'
import Layout from '../components/layout'
const Profile = () => {
const user = useUser({ redirectTo: '/login' })
return (
<Layout>
<h1>Profile</h1>
{user && (
<>
<p>Your session:</p>
<pre>{JSON.stringify(user, null, 2)}</pre>
</>
)}
</Layout>
)
}
export default Profile