Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add Facebook Custom Auth Support #880

Merged
merged 3 commits into from
Sep 19, 2024
Merged

Conversation

Timothyw0
Copy link
Member

@Timothyw0 Timothyw0 commented Aug 13, 2024

Description

New feature: Adding Facebook custom auth support using Facebook's manual OIDC token flow. A few more refactors had to be done to the previous code since Facebook's flow is a little bit different, mainly:

  • Facebook's auth provider schema is different in staticwebapp.config.json
  • There is no introspection endpoint after getting the token so we need to manually decode the returned JWT

Testing

staticwebapp.config.json:
image

Facebook /.auth/me:
image

Github /.auth/me:
image

AAD /.auth/me:
image

Google /.auth/me:
image

@github-actions github-actions bot added scope: core Issues happened a the ./src/core level scope: auth Issues related to the authentication emulator labels Aug 13, 2024
@Timothyw0 Timothyw0 marked this pull request as ready for review August 13, 2024 20:30
Copy link
Contributor

@cjk7989 cjk7989 left a comment

Choose a reason for hiding this comment

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

It looks that the PR could work well in both Windows and Linux. Approved.

Copy link
Contributor

Choose a reason for hiding this comment

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

For the comments in Line 15:
// only match for providers with custom auth support implemented (github, google, aad)

Should we update the supported provider type?

@Timothyw0 Timothyw0 merged commit 5f440e3 into Azure:main Sep 19, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: auth Issues related to the authentication emulator scope: core Issues happened a the ./src/core level
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants