Skip to content

Commit

Permalink
Dash Off: Use the right Client ID based on Raycast Flavour (raycast#1…
Browse files Browse the repository at this point in the history
…0649)

* Update oauth.ts

* Update CHANGELOG.md
  • Loading branch information
peduarte authored Feb 8, 2024
1 parent 1b2f571 commit 603a54a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion extensions/dash-off/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

## [Update] - 2024-08-01

- Google has now approved our OAuth Consent Screen. Users no longer need to create their own Client ID.
- Google has now approved our OAuth Consent Screen. Users no longer need to create their own Client ID
- Switch Client ID based on Raycast Flavour

## [Update] - 2024-07-01

Expand Down
4 changes: 3 additions & 1 deletion extensions/dash-off/src/lib/oauth.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { OAuth } from "@raycast/api";
import fetch from "cross-fetch";

const raycastBundleId = process.env.RAYCAST_BUNDLE_ID?.includes("internal") ? "internal" : "production";

const clientIds = {
internal: "294480066767-816sgubnqjc3u5mge0am5ncltgh8uvvr.apps.googleusercontent.com",
production: "294480066767-1pk79i9blrm0tgva3c0p3a35j6f4upm6.apps.googleusercontent.com",
};

export const clientId = clientIds.production;
export const clientId = clientIds[raycastBundleId];

export const client = new OAuth.PKCEClient({
redirectMethod: OAuth.RedirectMethod.AppURI,
Expand Down

0 comments on commit 603a54a

Please sign in to comment.