Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bafa3e0ec0 | |||
| df8d8f0d73 | |||
| 74d7b10386 | |||
| 9467737a7c | |||
| 5c7f940b7e | |||
| 3fa79423bd |
@@ -17,7 +17,9 @@ function App() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const loadMe = async () => {
|
const loadMe = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch('/auth/me', { credentials: 'include' })
|
const response = await fetch(`/auth/me`, {
|
||||||
|
credentials: 'include',
|
||||||
|
})
|
||||||
|
|
||||||
if (response.status === 401) {
|
if (response.status === 401) {
|
||||||
setUser(null)
|
setUser(null)
|
||||||
@@ -55,6 +57,8 @@ function App() {
|
|||||||
void loadMe()
|
void loadMe()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
const loginUrl = `/api/login`
|
||||||
|
const logoutUrl = `/api/logout`
|
||||||
// Authenticated — render player immediately
|
// Authenticated — render player immediately
|
||||||
if (!loading && user) {
|
if (!loading && user) {
|
||||||
return <FurumiPlayer user={user} />
|
return <FurumiPlayer user={user} />
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ const oidcConfig = {
|
|||||||
response_type: 'code',
|
response_type: 'code',
|
||||||
scope: process.env.OIDC_SCOPE ?? 'openid profile email offline_access',
|
scope: process.env.OIDC_SCOPE ?? 'openid profile email offline_access',
|
||||||
},
|
},
|
||||||
|
routes: {
|
||||||
|
callback: process.env.OIDC_REDIRECT_URL
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!disableAuth && (!oidcConfig.clientID || !oidcConfig.issuerBaseURL || !oidcConfig.clientSecret)) {
|
if (!disableAuth && (!oidcConfig.clientID || !oidcConfig.issuerBaseURL || !oidcConfig.clientSecret)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user