Skip to content

Commit

Permalink
Merge pull request #32 from openfort-xyz/feat/facebook-oauth
Browse files Browse the repository at this point in the history
feat: add facebook as oauth provider
  • Loading branch information
gllm-dev authored May 31, 2024
2 parents ba4dca6 + 413421f commit 63da930
Show file tree
Hide file tree
Showing 14 changed files with 149 additions and 12 deletions.
10 changes: 7 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.7.4] - 2024-05-31
### Added
- Facebook login support

## [0.7.3] - 2024-05-31
### Fix
### Added
- Add export of EIP-1193 provider


## [0.7.2] - 2024-05-31
### Fix
- Add now authentication endpoints with openfort
### Added
- Add new authentication endpoints with openfort


## [0.7.1] - 2024-05-29
Expand Down
41 changes: 40 additions & 1 deletion packages/internal/openapi-clients/src/backend-openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
"wallet",
"google",
"twitter",
"facebook",
"accelbyte",
"firebase",
"lootlocker",
Expand Down Expand Up @@ -830,7 +831,8 @@
"description": "Enum of the supporting OAuth providers.",
"enum": [
"google",
"twitter"
"twitter",
"facebook"
],
"type": "string"
},
Expand Down Expand Up @@ -1032,6 +1034,40 @@
"type": "object",
"additionalProperties": false
},
"OAuthProvider.FACEBOOK": {
"enum": [
"facebook"
],
"type": "string"
},
"FacebookOAuthConfig": {
"properties": {
"enabled": {
"type": "boolean",
"description": "Enable OAuth provider."
},
"provider": {
"$ref": "#/components/schemas/OAuthProvider.FACEBOOK",
"description": "OAuth provider type"
},
"clientId": {
"type": "string",
"description": "Facebook API client ID."
},
"clientSecret": {
"type": "string",
"description": "Facebook API client secret."
}
},
"required": [
"enabled",
"provider",
"clientId",
"clientSecret"
],
"type": "object",
"additionalProperties": false
},
"ThirdPartyOAuthProvider.PLAYFAB": {
"enum": [
"playfab"
Expand Down Expand Up @@ -1167,6 +1203,9 @@
{
"$ref": "#/components/schemas/TwitterOAuthConfig"
},
{
"$ref": "#/components/schemas/FacebookOAuthConfig"
},
{
"$ref": "#/components/schemas/PlayFabOAuthConfig"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ models/event-delete-response.ts
models/event-list-queries.ts
models/event-list-response.ts
models/event-response.ts
models/facebook-oauth-config.ts
models/fee.ts
models/field-errors-value.ts
models/firebase-oauth-config.ts
Expand Down Expand Up @@ -186,6 +187,7 @@ models/oauth-config-list-response.ts
models/oauth-config.ts
models/oauth-init-request-options.ts
models/oauth-init-request.ts
models/oauth-provider-facebook.ts
models/oauth-provider-google.ts
models/oauth-provider-twitter.ts
models/oauth-provider.ts
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const AuthProviderResponse = {
Wallet: 'wallet',
Google: 'google',
Twitter: 'twitter',
Facebook: 'facebook',
Accelbyte: 'accelbyte',
Firebase: 'firebase',
Lootlocker: 'lootlocker',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/* tslint:disable */
/* eslint-disable */
/**
* Openfort API
* Complete Openfort API references and guides can be found at: https://openfort.xyz/docs
*
* The version of the OpenAPI document: 1.0.0
* Contact: founders@openfort.xyz
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


// May contain unused imports in some cases
// @ts-ignore
import { OAuthProviderFACEBOOK } from './oauth-provider-facebook';

/**
*
* @export
* @interface FacebookOAuthConfig
*/
export interface FacebookOAuthConfig {
/**
* Enable OAuth provider.
* @type {boolean}
* @memberof FacebookOAuthConfig
*/
'enabled': boolean;
/**
*
* @type {OAuthProviderFACEBOOK}
* @memberof FacebookOAuthConfig
*/
'provider': OAuthProviderFACEBOOK;
/**
* Facebook API client ID.
* @type {string}
* @memberof FacebookOAuthConfig
*/
'clientId': string;
/**
* Facebook API client secret.
* @type {string}
* @memberof FacebookOAuthConfig
*/
'clientSecret': string;
}



2 changes: 2 additions & 0 deletions packages/internal/openapi-clients/src/backend/models/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ export * from './event-delete-response';
export * from './event-list-queries';
export * from './event-list-response';
export * from './event-response';
export * from './facebook-oauth-config';
export * from './fee';
export * from './field-errors-value';
export * from './firebase-oauth-config';
Expand Down Expand Up @@ -160,6 +161,7 @@ export * from './oauth-config-list-response';
export * from './oauth-init-request';
export * from './oauth-init-request-options';
export * from './oauth-provider';
export * from './oauth-provider-facebook';
export * from './oauth-provider-google';
export * from './oauth-provider-twitter';
export * from './oauth-request';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ import { AccelbyteOAuthConfig } from './accelbyte-oauth-config';
import { CustomAuthConfig } from './custom-auth-config';
// May contain unused imports in some cases
// @ts-ignore
import { FacebookOAuthConfig } from './facebook-oauth-config';
// May contain unused imports in some cases
// @ts-ignore
import { FirebaseOAuthConfig } from './firebase-oauth-config';
// May contain unused imports in some cases
// @ts-ignore
Expand Down Expand Up @@ -99,13 +102,13 @@ export interface OAuthConfig {
*/
'baseUrl': string;
/**
* Twitter API consumer key.
* Facebook API client ID.
* @type {string}
* @memberof OAuthConfig
*/
'clientId': string;
/**
* Twitter API consumer secret.
* Facebook API client secret.
* @type {string}
* @memberof OAuthConfig
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* tslint:disable */
/* eslint-disable */
/**
* Openfort API
* Complete Openfort API references and guides can be found at: https://openfort.xyz/docs
*
* The version of the OpenAPI document: 1.0.0
* Contact: founders@openfort.xyz
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



/**
*
* @export
* @enum {string}
*/

export const OAuthProviderFACEBOOK = {
Facebook: 'facebook'
} as const;

export type OAuthProviderFACEBOOK = typeof OAuthProviderFACEBOOK[keyof typeof OAuthProviderFACEBOOK];



Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@

export const OAuthProvider = {
Google: 'google',
Twitter: 'twitter'
Twitter: 'twitter',
Facebook: 'facebook'
} as const;

export type OAuthProvider = typeof OAuthProvider[keyof typeof OAuthProvider];
Expand Down
2 changes: 1 addition & 1 deletion packages/platform-bridge/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@openfort/platform-bridge",
"version": "0.0.0",
"dependencies": {
"@openfort/openfort-js": "0.7.3"
"@openfort/openfort-js": "0.7.4"
},
"devDependencies": {
"eslint": "^8.40.0",
Expand Down
2 changes: 1 addition & 1 deletion sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openfort/openfort-js",
"version": "0.7.3",
"version": "0.7.4",
"author": "Openfort (https://www.openfort.xyz)",
"bugs": "https://github.com/openfort-xyz/openfort-js/issues",
"repository": "openfort-xyz/openfort-js.git",
Expand Down
2 changes: 2 additions & 0 deletions sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,15 @@ export const AUTH_PROVIDER = {
supabase: 'supabase',
custom: 'custom',
oidc: 'oidc',
facebook: 'facebook',
} as const;

export type AuthProvider = typeof AUTH_PROVIDER[keyof typeof AUTH_PROVIDER];

export enum OAuthProvider {
GOOGLE = 'google',
TWITTER = 'twitter',
FACEBOOK = 'facebook',
}

export interface NextActionPayload {
Expand Down
2 changes: 1 addition & 1 deletion sdk/src/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const VERSION = '0.7.3';
export const VERSION = '0.7.4';
export const PACKAGE = '@openfort/openfort-js';
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,7 @@ __metadata:
languageName: unknown
linkType: soft

"@openfort/openfort-js@0.7.3, @openfort/openfort-js@workspace:sdk":
"@openfort/openfort-js@0.7.4, @openfort/openfort-js@workspace:sdk":
version: 0.0.0-use.local
resolution: "@openfort/openfort-js@workspace:sdk"
dependencies:
Expand Down Expand Up @@ -1314,7 +1314,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@openfort/platform-bridge@workspace:packages/platform-bridge"
dependencies:
"@openfort/openfort-js": 0.7.3
"@openfort/openfort-js": 0.7.4
eslint: ^8.40.0
parcel: ^2.8.3
languageName: unknown
Expand Down

0 comments on commit 63da930

Please sign in to comment.