Skip to content

Commit

Permalink
fix: Server side tokens need the application id, different from the o…
Browse files Browse the repository at this point in the history
…auth client id
  • Loading branch information
ryanwi committed Jan 11, 2024
1 parent 8dd81be commit e45864b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions env.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ FIREBASE_MEASUREMENT_ID=<foo>
FIREBASE_VAPID_KEY=<foo>

#OAUTH Settings
OAUTH_APPLICATION_ID=<foo>
OAUTH_CLIENT_ID=<foo>
OAUTH_SECRET=<foo>
OAUTH_TOKEN_URI=https://id.fabric.swire.io/oauth/token
Expand All @@ -24,3 +25,5 @@ SESSION_SECRET=

SUBSCRIBER_REFERENCE=
SUBSCRIBER_PASSWORD=

RELAY_HOST=relay.swire.io
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const FIREBASE_CONFIG = JSON.stringify({
const token_request = {
reference: process.env.SUBSCRIBER_REFERENCE,
password: process.env.SUBSCRIBER_PASSWORD,
application_id: process.env.CLIENT_ID
application_id: process.env.OAUTH_APPLICATION_ID
}

const host = process.env.RELAY_HOST
Expand Down

0 comments on commit e45864b

Please sign in to comment.