| 56 | } |
| 57 | |
| 58 | function isPublicURL() { |
| 59 | const pathname = document.location.pathname |
| 60 | |
| 61 | // /oauth/authorize requires auth (consent screen), but /oauth/:type (callbacks) is public. |
| 62 | if (pathname.startsWith('/oauth/authorize')) { |
| 63 | return false |
| 64 | } |
| 65 | |
| 66 | const publicPaths = [ |
| 67 | '/', |
| 68 | '/404', |
| 69 | '/home', |
| 70 | '/password-reset', |
| 71 | '/maintenance', |
| 72 | '/github-setup', |
| 73 | '/oauth', |
| 74 | '/register', |
| 75 | '/saml', |
| 76 | '/signup', |
| 77 | '/login', |
| 78 | ] |
| 79 | |
| 80 | return publicPaths.some( |
| 81 | (path) => pathname === path || pathname.startsWith(`${path}/`), |
| 82 | ) |
| 83 | } |
| 84 | |
| 85 | setTimeout(() => { |
| 86 | const browserHistory = createBrowserHistory({ |