Skip to content

Send token in Authorization header from SDK requests#74

Merged
3mcd merged 4 commits into
mainfrom
em/sdk-token
Sep 7, 2023
Merged

Send token in Authorization header from SDK requests#74
3mcd merged 4 commits into
mainfrom
em/sdk-token

Conversation

@3mcd
Copy link
Copy Markdown
Collaborator

@3mcd 3mcd commented Sep 7, 2023

This PR adds a new auth method to the SDK which takes an instance ID and auth token and fetches user details from core. The other SDK methods were also updated to pass the token to their respective API endpoints using the Authorization header.

Issue(s) Resolved

N/A

Test Plan

  1. Log into core and visit the Unjournal community.
  2. Go to http://localhost:3000/c/unjournal/stages (or https://core-pr-74-y0x1.onrender.com/c/unjournal/stages if testing through review app).
  3. Click on the first pub's integrations dropdown button ("6 integrations") and click "Submit Pub"
  4. In the browser's search bar replace https://integration-submissions.onrender.com with http://localhost:3002 (or https://integration-submissions-pr-74.onrender.com if testing through review app).
  5. You should see "Hello, Jill Admin" along with the user's avatar.

Comment thread core/lib/contracts/resources/integrations.ts Outdated
@isTravis isTravis temporarily deployed to em/sdk-token - core PR #74 September 7, 2023 20:41 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/sdk-token - integration-evaluations PR #74 September 7, 2023 20:41 — with Render Destroyed
@isTravis isTravis temporarily deployed to em/sdk-token - integration-submissions PR #74 September 7, 2023 20:41 — with Render Destroyed
@3mcd 3mcd changed the title [DRAFT] Send token in Authorization header from SDK requests Send token in Authorization header from SDK requests Sep 7, 2023
@3mcd 3mcd requested a review from kalilsn September 7, 2023 20:55
Copy link
Copy Markdown
Contributor

@kalilsn kalilsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

approved by jill admin

@3mcd 3mcd merged commit b79843c into main Sep 7, 2023
@3mcd 3mcd deleted the em/sdk-token branch September 7, 2023 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants