mirror of
https://github.com/ditkrg/AuthorizationServerDemos.git
synced 2026-01-25 20:22:58 +00:00
add a sample AuthorizationServer to the repo and put traffic-police app in a separate folder
This commit is contained in:
22
React/traffic-police/src/pages/signout-oidc.js
Normal file
22
React/traffic-police/src/pages/signout-oidc.js
Normal file
@@ -0,0 +1,22 @@
|
||||
import React, { useEffect } from 'react'
|
||||
import { signoutRedirectCallback } from '../services/userService'
|
||||
import { useHistory } from 'react-router-dom'
|
||||
|
||||
function SignoutOidc() {
|
||||
const history = useHistory()
|
||||
useEffect(() => {
|
||||
async function signoutAsync() {
|
||||
await signoutRedirectCallback()
|
||||
history.push('/')
|
||||
}
|
||||
signoutAsync()
|
||||
}, [history])
|
||||
|
||||
return (
|
||||
<div>
|
||||
Redirecting...
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export default SignoutOidc
|
||||
Reference in New Issue
Block a user