Skip to content

Commit 43b0921

Browse files
authored
Google login (#3)
* feat: basic google login * feat: integrate Google OAuth with custom implementation and dynamic configuration * feat: enhance admin panel with dynamic Google Auth configuration and loading states * refactor: update login page layout and enhance button components * ui: remove quick actions from admin dashboard, added padding for admin dashboard page * refactor: improve code quality * readme: updated system admin setup instructions inside of the guide * docs: add detailed Google OAuth setup instructions for system admins * ui: fix google auth buttons overflowing container on mobile * ux: allow user to key in project ID for convenience links * ui: update Google Auth setup instructions for clarity and improve error handling in OAuth callback * bugfix: improve configuration testing and input validation * ui: allow unmasking of google client secret * improve wording and setup guide * fixed padding * move auth back into modules * move auth components back into auth module * fixed path aliases for auth module * update auth to allow tracking for which kind of mode was used to login * allow users to have multiple third party auths * added disconnect google account flow * refactor: enhance Google account connection flow with improved error handling and user feedback - Updated the GoogleConnectCallback component to utilize a card UI for loading and error states. - Enhanced error handling by setting error states and stopping processing instead of navigating away. - Added functionality to convert anonymous users to full users upon Google account connection. - Improved success messages to provide clearer feedback to users. * fix flash to "success" before failing * improve connect button for Google * hide google section and connection if the google auth module is disabled
1 parent 95c6127 commit 43b0921

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+5426
-678
lines changed

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,35 @@ If you prefer to set up manually:
3030
```
3131
3. Run `pnpm dev` in the root directory to start both services
3232

33+
## System Administration Setup
34+
35+
To create a system administrator:
36+
37+
1. **Login anonymously** via the login page
38+
2. **Set admin privileges** in [Convex Dashboard](https://dashboard.convex.dev):
39+
- Go to Data > `users` table
40+
- Find your user record and set `accessLevel` to `"system_admin"`
41+
3. **Access admin dashboard** by clicking your username → "System Admin"
42+
43+
System admins can configure Google OAuth, manage authentication providers, and access system settings.
44+
45+
## Google Auth Setup
46+
47+
To enable Google OAuth authentication:
48+
49+
1. **Configure Google OAuth** in your app's admin dashboard:
50+
- Login with your system admin account
51+
- Go to your username → "System Admin" → "Google Auth Config"
52+
- Follow the instructions to set up Google OAuth credentials
53+
54+
2. **Transfer admin role to Google account** (Recommended):
55+
- After Google Auth is configured, sign in with your Google account
56+
- In [Convex Dashboard](https://dashboard.convex.dev), go to Data > `users` table
57+
- Find your Google account user record and set `accessLevel` to `"system_admin"`
58+
- Remove the `system_admin` access level from the temporary anonymous account
59+
60+
This ensures your system admin access is tied to a verified Google account for better security.
61+
3362
## Project Structure
3463

3564
- `apps/webapp`: The frontend NextJS application

apps/webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"@radix-ui/react-select": "^2.2.4",
2525
"@radix-ui/react-separator": "^1.1.7",
2626
"@radix-ui/react-slot": "^1.2.3",
27+
"@radix-ui/react-switch": "^1.2.5",
2728
"@radix-ui/react-tabs": "^1.1.12",
2829
"@types/luxon": "^3.6.2",
2930
"@workspace/backend": "workspace:*",

0 commit comments

Comments
 (0)