@rebasepro/auth 0.0.1-canary.4d4fb3e → 0.0.1-canary.ca2cb6e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api.d.ts +13 -0
- package/dist/hooks/useBackendUserManagement.d.ts +1 -0
- package/dist/index.es.js +287 -147
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +285 -146
- package/dist/index.umd.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/package.json +46 -46
- package/src/api.ts +43 -5
- package/src/components/AdminViews.tsx +64 -67
- package/src/components/RebaseLoginView.tsx +54 -53
- package/src/hooks/useBackendUserManagement.ts +22 -26
- package/src/hooks/useRebaseAuthController.ts +34 -14
- package/src/index.ts +2 -2
- package/src/types.ts +2 -0
package/dist/api.d.ts
CHANGED
|
@@ -23,6 +23,15 @@ export declare function login(email: string, password: string): Promise<AuthResp
|
|
|
23
23
|
* Login with Google ID token
|
|
24
24
|
*/
|
|
25
25
|
export declare function googleLogin(idToken: string): Promise<AuthResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Login with LinkedIn OAuth code
|
|
28
|
+
*/
|
|
29
|
+
export declare function linkedinLogin(code: string, redirectUri: string): Promise<AuthResponse>;
|
|
30
|
+
/**
|
|
31
|
+
* Generic OAuth login — works with any provider registered on the backend.
|
|
32
|
+
* The `providerId` is used to build the endpoint: `/api/auth/{providerId}`.
|
|
33
|
+
*/
|
|
34
|
+
export declare function oauthLogin(providerId: string, payload: Record<string, unknown>): Promise<AuthResponse>;
|
|
26
35
|
/**
|
|
27
36
|
* Refresh access token using refresh token
|
|
28
37
|
*/
|
|
@@ -108,8 +117,12 @@ export interface AuthConfigResponse {
|
|
|
108
117
|
registrationEnabled: boolean;
|
|
109
118
|
/** Whether Google OAuth is configured */
|
|
110
119
|
googleEnabled: boolean;
|
|
120
|
+
/** Whether LinkedIn OAuth is configured */
|
|
121
|
+
linkedinEnabled: boolean;
|
|
111
122
|
/** Whether email service is configured */
|
|
112
123
|
emailServiceEnabled: boolean;
|
|
124
|
+
/** Complete list of enabled OAuth provider IDs (e.g. ["google", "github", "discord"]) */
|
|
125
|
+
enabledProviders?: string[];
|
|
113
126
|
}
|
|
114
127
|
/**
|
|
115
128
|
* Fetch auth configuration / status from the backend
|