You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Clicking "Login with Google" on the admin dashboard navigates to an incorrect URL #1671
When a Google OAuth provider is configured and the user clicks "Login with Google" on the admin login page, the browser is redirected to an incorrect URL with a duplicated path segment, resulting in a 404 error.
The login button at /_emdash/admin links to /_emdash/admin/_emdash/api/auth/oauth/google instead of /_emdash/api/auth/oauth/google.
Steps to reproduce
Configure Google as an OAuth auth provider in the EmDash integration config
Set EMDASH_OAUTH_GOOGLE_CLIENT_ID and EMDASH_OAUTH_GOOGLE_CLIENT_SECRET
Navigate to /_emdash/admin
Click the "Login with Google" button
Expected: Browser navigates to /_emdash/api/auth/oauth/google
Actual: Browser navigates to /_emdash/admin/_emdash/api/auth/oauth/google (double _emdash in path), resulting in a 404
Confirmed from a real deployed EmDash admin/OAuth flow.
I tested this against a production site with Google and GitHub OAuth providers configured. The issue is in the admin login provider link routing: OAuth provider URLs must leave the admin SPA and go to /_emdash/api/auth/oauth/{provider}, not be treated as admin-router links under /_emdash/admin.
Verification notes:
A pre-fix check of the admin routing behavior showed the non-admin /_emdash/api/auth/oauth/google path was not protected from admin basepath handling.
With the PR-equivalent fix deployed, the login page renders the Google provider link as /_emdash/api/auth/oauth/google.
Google starts at https://accounts.google.com/o/oauth2/v2/auth.
GitHub starts at https://github.com/login/oauth/authorize.
After adding the production Google callback URI, Google login completes successfully for the existing Mason James admin user.
Activity
masonjames commentedon Jul 9, 2026
Confirmed from a real deployed EmDash admin/OAuth flow.
I tested this against a production site with Google and GitHub OAuth providers configured. The issue is in the admin login provider link routing: OAuth provider URLs must leave the admin SPA and go to
/_emdash/api/auth/oauth/{provider}, not be treated as admin-router links under/_emdash/admin.Verification notes:
/_emdash/api/auth/oauth/googlepath was not protected from admin basepath handling./_emdash/api/auth/oauth/google.https://accounts.google.com/o/oauth2/v2/auth.https://github.com/login/oauth/authorize.