Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions apps/x/apps/main/src/oauth-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ function cancelActiveFlow(reason: string = 'cancelled'): void {

// Only emit event for user-visible cancellations
if (reason !== 'new_flow_started') {
const provider = activeFlow.provider;
const error = (reason === 'timed_out' && provider === 'google')
? 'Timed out waiting for Google OAuth to finish. If your browser showed “Error 401: invalid_client”, double-check that you entered the OAuth Client ID (it should end with .apps.googleusercontent.com) and that it was created as a Desktop app OAuth client. Setup guide: https://github.com/rowboatlabs/rowboat/blob/main/google-setup.md'
: `OAuth flow ${reason}`;

emitOAuthEvent({
provider: activeFlow.provider,
provider,
success: false,
error: `OAuth flow ${reason}`
error,
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function GoogleClientIdModal({
<DialogHeader>
<DialogTitle>Enter Google Client ID</DialogTitle>
<DialogDescription>
This app does not store the client ID. You will be prompted each session.
Paste the OAuth Client ID (it should end with .apps.googleusercontent.com). Do not paste the client secret. This app does not store it, so you will be prompted each session.
</DialogDescription>
</DialogHeader>
<div className="space-y-2">
Expand Down
29 changes: 21 additions & 8 deletions google-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,25 +114,38 @@ Click **Create Credentials → OAuth Client ID**

Select:

**Universal Windows Platform (UWP)**
**Desktop app**

- Name it anything (e.g. `Rowboat Desktop`)
- Store ID can be anything (e.g. `test` )
- Click **Create**

![Create OAuth Client ID (UWP)](https://raw.githubusercontent.com/rowboatlabs/rowboat/main/apps/docs/docs/img/google-setup/05-create-oauth-client-uwp.png)
> Note: Rowboat Desktop uses a local redirect URI during OAuth:
>
> `http://localhost:8080/oauth/callback`

---

## 7️⃣ Copy the Client ID

After creation, Google will show:
After creation, Google will show a **Client ID** (and sometimes a **Client Secret**).

- **Client ID**
- **Client Secret**

Copy the **Client ID** and paste it into Rowboat where prompted.
Copy the **Client ID** and paste it into Rowboat where prompted. (Rowboat uses PKCE and does not require the client secret.)

![Copy Client ID](https://raw.githubusercontent.com/rowboatlabs/rowboat/main/apps/docs/docs/img/google-setup/06-copy-client-id.png)

---

## Troubleshooting

### Error 401: invalid_client ("The OAuth client was not found")

- Make sure you pasted the **Client ID** (not the client secret, API key, service account, or project ID).
- A Google OAuth Client ID typically looks like:
`xxxxxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxx.apps.googleusercontent.com`
- Ensure the OAuth Client was created in the same Google Cloud project where you enabled the Gmail/Calendar/Drive APIs.

### OAuth times out / never returns to Rowboat

- Make sure nothing else is using port `8080` and that your firewall allows `http://localhost:8080` connections.

---