Skip to content

Commit

Permalink
feature: add facebook o-auth (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
CRAZy-Monk3Y authored Dec 10, 2024
1 parent dbcf1e9 commit 7857f85
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions packages/openauth/src/adapter/facebook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Oauth2Adapter, Oauth2WrappedConfig } from "./oauth2.js";
import { OidcAdapter, OidcWrappedConfig } from "./oidc.js";

export function FacebookAdapter(config: Oauth2WrappedConfig) {
return Oauth2Adapter({
...config,
type: "facebook",
endpoint: {
authorization: "https://www.facebook.com/v12.0/dialog/oauth",
token: "https://graph.facebook.com/v12.0/oauth/access_token",
},
});
}

export function FacebookOidcAdapter(config: OidcWrappedConfig) {
return OidcAdapter({
...config,
type: "facebook",
issuer: "https://graph.facebook.com",
});
}

0 comments on commit 7857f85

Please sign in to comment.