|
import React from 'react'
|
|
import { useAuth } from "react-oidc-context"
|
|
|
|
export default function AuthBar() {
|
|
const auth = useAuth()
|
|
|
|
return (
|
|
<div>
|
|
Hi {auth.user?.profile.preferred_username} .
|
|
<button
|
|
onClick={() => auth.signoutRedirect()}
|
|
>
|
|
Logout
|
|
</button>
|
|
</div>
|
|
)
|
|
}
|