@asgardeo/react 0.5.22 → 0.5.24
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/cjs/index.js +941 -877
- package/dist/cjs/index.js.map +4 -4
- package/dist/components/presentation/SignIn/options/SignInOptionFactory.d.ts +3 -3
- package/dist/components/presentation/SignUp/options/SignUpOptionFactory.d.ts +1 -1
- package/dist/components/presentation/UserProfile/BaseUserProfile.d.ts +3 -0
- package/dist/components/presentation/UserProfile/UserProfile.d.ts +10 -0
- package/dist/components/presentation/{SignIn/options → options}/FacebookButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/GitHubButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/GoogleButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/LinkedInButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/MicrosoftButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/SignInWithEthereumButton.d.ts +3 -3
- package/dist/components/presentation/{SignIn/options → options}/SocialButton.d.ts +3 -3
- package/dist/components/primitives/Avatar/Avatar.d.ts +4 -0
- package/dist/components/primitives/Avatar/Avatar.styles.d.ts +1 -0
- package/dist/contexts/Asgardeo/AsgardeoContext.d.ts +6 -5
- package/dist/index.d.ts +8 -8
- package/dist/index.js +686 -618
- package/dist/index.js.map +4 -4
- package/package.json +2 -2
- package/dist/components/presentation/SignUp/options/GoogleButton.d.ts +0 -25
- package/dist/components/presentation/SignUp/options/index.d.ts +0 -26
|
@@ -24,7 +24,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
|
|
|
24
24
|
/**
|
|
25
25
|
* The authenticator configuration.
|
|
26
26
|
*/
|
|
27
|
-
authenticator
|
|
27
|
+
authenticator?: EmbeddedSignInFlowAuthenticator;
|
|
28
28
|
/**
|
|
29
29
|
* Current form values.
|
|
30
30
|
*/
|
|
@@ -48,7 +48,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
|
|
|
48
48
|
/**
|
|
49
49
|
* Callback function called when the option is submitted.
|
|
50
50
|
*/
|
|
51
|
-
onSubmit
|
|
51
|
+
onSubmit?: (authenticator: EmbeddedSignInFlowAuthenticator, formData?: Record<string, string>) => void;
|
|
52
52
|
/**
|
|
53
53
|
* Custom CSS class name for form inputs.
|
|
54
54
|
*/
|
|
@@ -65,7 +65,7 @@ export interface BaseSignInOptionProps extends WithPreferences {
|
|
|
65
65
|
/**
|
|
66
66
|
* Creates the appropriate sign-in option component based on the authenticator's ID.
|
|
67
67
|
*/
|
|
68
|
-
export declare const createSignInOption: (
|
|
68
|
+
export declare const createSignInOption: ({ authenticator, onSubmit, buttonClassName, preferences, ...rest }: BaseSignInOptionProps) => ReactElement;
|
|
69
69
|
/**
|
|
70
70
|
* Convenience function that creates the appropriate sign-in option component from an authenticator.
|
|
71
71
|
*/
|
|
@@ -74,7 +74,7 @@ export interface BaseSignUpOptionProps extends WithPreferences {
|
|
|
74
74
|
/**
|
|
75
75
|
* Creates the appropriate sign-up component based on the component type.
|
|
76
76
|
*/
|
|
77
|
-
export declare const createSignUpComponent: (
|
|
77
|
+
export declare const createSignUpComponent: ({ component, onSubmit, ...rest }: BaseSignUpOptionProps) => ReactElement;
|
|
78
78
|
/**
|
|
79
79
|
* Convenience function that creates the appropriate sign-up component from flow component data.
|
|
80
80
|
*/
|
|
@@ -49,14 +49,17 @@ export interface BaseUserProfileProps {
|
|
|
49
49
|
editable?: boolean;
|
|
50
50
|
fallback?: ReactElement;
|
|
51
51
|
flattenedProfile?: User;
|
|
52
|
+
hideFields?: string[];
|
|
52
53
|
mode?: 'inline' | 'popup';
|
|
53
54
|
onOpenChange?: (open: boolean) => void;
|
|
54
55
|
onUpdate?: (payload: any) => Promise<void>;
|
|
55
56
|
open?: boolean;
|
|
56
57
|
profile?: User;
|
|
57
58
|
schemas?: Schema[];
|
|
59
|
+
showFields?: string[];
|
|
58
60
|
title?: string;
|
|
59
61
|
error?: string | null;
|
|
62
|
+
isLoading?: boolean;
|
|
60
63
|
}
|
|
61
64
|
declare const BaseUserProfile: FC<BaseUserProfileProps>;
|
|
62
65
|
export default BaseUserProfile;
|
|
@@ -43,6 +43,16 @@ export type UserProfileProps = Omit<BaseUserProfileProps, 'user' | 'profile' | '
|
|
|
43
43
|
* cardLayout={true}
|
|
44
44
|
* fallback={<div>Please sign in to view your profile</div>}
|
|
45
45
|
* />
|
|
46
|
+
*
|
|
47
|
+
* // With field filtering - only show specific fields
|
|
48
|
+
* <UserProfile
|
|
49
|
+
* showFields={['name.givenName', 'name.familyName', 'emails']}
|
|
50
|
+
* />
|
|
51
|
+
*
|
|
52
|
+
* // With field hiding - hide specific fields
|
|
53
|
+
* <UserProfile
|
|
54
|
+
* hideFields={['phoneNumbers', 'addresses']}
|
|
55
|
+
* />
|
|
46
56
|
* ```
|
|
47
57
|
*/
|
|
48
58
|
declare const UserProfile: FC<UserProfileProps>;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Facebook Sign-In Button Component.
|
|
22
22
|
* Handles authentication with Facebook identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const FacebookButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const FacebookButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default FacebookButton;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* GitHub Sign-In Button Component.
|
|
22
22
|
* Handles authentication with GitHub identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const GitHubButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const GitHubButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default GitHubButton;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Google Sign-In Button Component.
|
|
22
22
|
* Handles authentication with Google identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const GoogleButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const GoogleButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default GoogleButton;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* LinkedIn Sign-In Button Component.
|
|
22
22
|
* Handles authentication with LinkedIn identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const LinkedInButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const LinkedInButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default LinkedInButton;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Microsoft Sign-In Button Component.
|
|
22
22
|
* Handles authentication with Microsoft identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const MicrosoftButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const MicrosoftButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default MicrosoftButton;
|
package/dist/components/presentation/{SignIn/options → options}/SignInWithEthereumButton.d.ts
RENAMED
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Sign In With Ethereum Button Component.
|
|
22
22
|
* Handles authentication with Sign In With Ethereum identity provider.
|
|
23
23
|
*/
|
|
24
|
-
declare const SignInWithEthereumButton: FC<BaseSignInOptionProps
|
|
24
|
+
declare const SignInWithEthereumButton: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default SignInWithEthereumButton;
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC } from 'react';
|
|
19
|
-
import { BaseSignInOptionProps } from '
|
|
18
|
+
import { FC, HTMLAttributes } from 'react';
|
|
19
|
+
import { BaseSignInOptionProps } from '../SignIn/options/SignInOptionFactory';
|
|
20
20
|
/**
|
|
21
21
|
* Social Login Sign-In Option Component.
|
|
22
22
|
* Handles authentication with external identity providers (Google, GitHub, etc.).
|
|
23
23
|
*/
|
|
24
|
-
declare const SocialLogin: FC<BaseSignInOptionProps
|
|
24
|
+
declare const SocialLogin: FC<BaseSignInOptionProps & HTMLAttributes<HTMLButtonElement>>;
|
|
25
25
|
export default SocialLogin;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
import { Context } from 'react';
|
|
19
19
|
import { HttpRequestConfig, HttpResponse, IdToken, Organization, SignInOptions, TokenExchangeRequestConfig, TokenResponse } from '@asgardeo/browser';
|
|
20
20
|
import AsgardeoReactClient from '../../AsgardeoReactClient';
|
|
21
|
+
import { AsgardeoReactConfig } from '../../models/config';
|
|
21
22
|
/**
|
|
22
23
|
* Props interface of {@link AsgardeoContext}
|
|
23
24
|
*/
|
|
@@ -86,7 +87,7 @@ export type AsgardeoContextProps = {
|
|
|
86
87
|
* @example
|
|
87
88
|
* signInOptions: { prompt: "login", fidp: "OrganizationSSO" }
|
|
88
89
|
*/
|
|
89
|
-
signInOptions
|
|
90
|
+
signInOptions: SignInOptions;
|
|
90
91
|
/**
|
|
91
92
|
* Function to retrieve the decoded ID token.
|
|
92
93
|
* This function decodes the ID token and returns its payload.
|
|
@@ -94,21 +95,21 @@ export type AsgardeoContextProps = {
|
|
|
94
95
|
*
|
|
95
96
|
* @returns A promise that resolves to the decoded ID token payload.
|
|
96
97
|
*/
|
|
97
|
-
getDecodedIdToken
|
|
98
|
+
getDecodedIdToken: () => Promise<IdToken>;
|
|
98
99
|
/**
|
|
99
100
|
* Retrieves the access token stored in the storage.
|
|
100
101
|
* This function retrieves the access token and returns it.
|
|
101
102
|
* @remarks This does not work in the `webWorker` or any other worker environment.
|
|
102
103
|
* @returns A promise that resolves to the access token.
|
|
103
104
|
*/
|
|
104
|
-
getAccessToken
|
|
105
|
+
getAccessToken: () => Promise<string>;
|
|
105
106
|
/**
|
|
106
107
|
* Swaps the current access token with a new one based on the provided configuration (with a grant type).
|
|
107
108
|
* @param config - Configuration for the token exchange request.
|
|
108
109
|
* @returns A promise that resolves to the token response or the raw response.
|
|
109
110
|
*/
|
|
110
|
-
exchangeToken
|
|
111
|
-
}
|
|
111
|
+
exchangeToken: (config: TokenExchangeRequestConfig) => Promise<TokenResponse | Response>;
|
|
112
|
+
} & Pick<AsgardeoReactConfig, 'storage'>;
|
|
112
113
|
/**
|
|
113
114
|
* Context object for managing the Authentication flow builder core context.
|
|
114
115
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -93,16 +93,16 @@ export { default as SignUp } from './components/presentation/SignUp/SignUp';
|
|
|
93
93
|
export * from './components/presentation/SignUp/SignUp';
|
|
94
94
|
export { default as IdentifierFirst } from './components/presentation/SignIn/options/IdentifierFirst';
|
|
95
95
|
export { default as UsernamePassword } from './components/presentation/SignIn/options/UsernamePassword';
|
|
96
|
-
export { default as GoogleButton } from './components/presentation/
|
|
97
|
-
export { default as GitHubButton } from './components/presentation/
|
|
98
|
-
export { default as MicrosoftButton } from './components/presentation/
|
|
99
|
-
export { default as FacebookButton } from './components/presentation/
|
|
100
|
-
export { default as LinkedInButton } from './components/presentation/
|
|
101
|
-
export { default as SignInWithEthereumButton } from './components/presentation/
|
|
96
|
+
export { default as GoogleButton } from './components/presentation/options/GoogleButton';
|
|
97
|
+
export { default as GitHubButton } from './components/presentation/options/GitHubButton';
|
|
98
|
+
export { default as MicrosoftButton } from './components/presentation/options/MicrosoftButton';
|
|
99
|
+
export { default as FacebookButton } from './components/presentation/options/FacebookButton';
|
|
100
|
+
export { default as LinkedInButton } from './components/presentation/options/LinkedInButton';
|
|
101
|
+
export { default as SignInWithEthereumButton } from './components/presentation/options/SignInWithEthereumButton';
|
|
102
102
|
export { default as EmailOtp } from './components/presentation/SignIn/options/EmailOtp';
|
|
103
103
|
export { default as Totp } from './components/presentation/SignIn/options/Totp';
|
|
104
104
|
export { default as SmsOtp } from './components/presentation/SignIn/options/SmsOtp';
|
|
105
|
-
export { default as SocialButton } from './components/presentation/
|
|
105
|
+
export { default as SocialButton } from './components/presentation/options/SocialButton';
|
|
106
106
|
export { default as MultiOptionButton } from './components/presentation/SignIn/options/MultiOptionButton';
|
|
107
107
|
export * from './components/presentation/SignIn/options/SignInOptionFactory';
|
|
108
108
|
export { default as BaseUser } from './components/presentation/User/BaseUser';
|
|
@@ -193,4 +193,4 @@ export { default as getSchemas, GetSchemasConfig } from './api/getSchemas';
|
|
|
193
193
|
export { default as updateMeProfile, UpdateMeProfileConfig } from './api/updateMeProfile';
|
|
194
194
|
export { default as getMeProfile } from './api/getScim2Me';
|
|
195
195
|
export * from './api/getScim2Me';
|
|
196
|
-
export { AsgardeoRuntimeError, http } from '@asgardeo/browser';
|
|
196
|
+
export { AsgardeoRuntimeError, http, getActiveTheme } from '@asgardeo/browser';
|