@asgardeo/nextjs 0.0.1 → 0.0.2
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/AsgardeoNextClient.d.ts +3 -2
- package/dist/AsgardeoNextClient.js +26 -16
- package/dist/AsgardeoNextClient.js.map +1 -1
- package/dist/cjs/index.js +14 -12
- package/dist/cjs/index.js.map +3 -3
- package/dist/client/components/actions/SignInButton/SignInButton.d.ts +49 -0
- package/dist/client/components/actions/SignInButton/SignInButton.js +52 -0
- package/dist/client/components/actions/SignInButton/SignInButton.js.map +1 -0
- package/dist/client/components/actions/{SignOutButton.d.ts → SignOutButton/SignOutButton.d.ts} +3 -2
- package/dist/client/components/actions/{SignOutButton.js → SignOutButton/SignOutButton.js} +2 -2
- package/dist/client/components/actions/SignOutButton/SignOutButton.js.map +1 -0
- package/dist/client/components/actions/{SignUpButton.d.ts → SignUpButton/SignUpButton.d.ts} +3 -2
- package/dist/client/components/actions/{SignUpButton.js → SignUpButton/SignUpButton.js} +2 -2
- package/dist/client/components/actions/SignUpButton/SignUpButton.js.map +1 -0
- package/dist/client/components/control/{SignedIn.js → SignedIn/SignedIn.js} +1 -1
- package/dist/client/components/control/SignedIn/SignedIn.js.map +1 -0
- package/dist/client/components/control/{SignedOut.js → SignedOut/SignedOut.js} +1 -1
- package/dist/client/components/control/SignedOut/SignedOut.js.map +1 -0
- package/dist/client/components/presentation/User/User.d.ts +61 -0
- package/dist/client/components/presentation/User/User.js +52 -0
- package/dist/client/components/presentation/User/User.js.map +1 -0
- package/dist/client/contexts/{AsgardeoContext.d.ts → Asgardeo/AsgardeoContext.d.ts} +8 -1
- package/dist/client/contexts/Asgardeo/AsgardeoContext.js.map +1 -0
- package/dist/client/{providers → contexts/Asgardeo}/AsgardeoProvider.d.ts +6 -1
- package/dist/client/contexts/Asgardeo/AsgardeoProvider.js +79 -0
- package/dist/client/contexts/Asgardeo/AsgardeoProvider.js.map +1 -0
- package/dist/client/{hooks → contexts/Asgardeo}/useAsgardeo.d.ts +1 -1
- package/dist/client/{hooks → contexts/Asgardeo}/useAsgardeo.js +1 -1
- package/dist/client/contexts/Asgardeo/useAsgardeo.js.map +1 -0
- package/dist/configs/InternalAuthAPIRoutesConfig.js +1 -0
- package/dist/configs/InternalAuthAPIRoutesConfig.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.js +5 -7
- package/dist/index.js.map +1 -1
- package/dist/models/api.d.ts +5 -0
- package/dist/server/AsgardeoProvider.d.ts +1 -1
- package/dist/server/AsgardeoProvider.js +1 -1
- package/dist/server/AsgardeoProvider.js.map +1 -1
- package/package.json +6 -6
- package/dist/client/components/actions/SignInButton.d.ts +0 -41
- package/dist/client/components/actions/SignInButton.js +0 -42
- package/dist/client/components/actions/SignInButton.js.map +0 -1
- package/dist/client/components/actions/SignOutButton.js.map +0 -1
- package/dist/client/components/actions/SignUpButton.js.map +0 -1
- package/dist/client/components/control/SignedIn.js.map +0 -1
- package/dist/client/components/control/SignedOut.js.map +0 -1
- package/dist/client/contexts/AsgardeoContext.js.map +0 -1
- package/dist/client/hooks/useAsgardeo.js.map +0 -1
- package/dist/client/providers/AsgardeoProvider.js +0 -23
- package/dist/client/providers/AsgardeoProvider.js.map +0 -1
- /package/dist/client/components/control/{SignedIn.d.ts → SignedIn/SignedIn.d.ts} +0 -0
- /package/dist/client/components/control/{SignedOut.d.ts → SignedOut/SignedOut.d.ts} +0 -0
- /package/dist/client/contexts/{AsgardeoContext.js → Asgardeo/AsgardeoContext.js} +0 -0
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoNodeClient, SignInOptions, SignOutOptions, User } from '@asgardeo/node';
|
|
18
|
+
import { AsgardeoNodeClient, SignInOptions, SignOutOptions, User, UserProfile } from '@asgardeo/node';
|
|
19
19
|
import { NextRequest, NextResponse } from 'next/server';
|
|
20
20
|
import { AsgardeoNextConfig } from './models/config';
|
|
21
21
|
/**
|
|
@@ -28,7 +28,8 @@ declare class AsgardeoNextClient<T extends AsgardeoNextConfig = AsgardeoNextConf
|
|
|
28
28
|
private asgardeo;
|
|
29
29
|
constructor();
|
|
30
30
|
initialize(config: T): Promise<boolean>;
|
|
31
|
-
getUser(): Promise<User>;
|
|
31
|
+
getUser(userId?: string): Promise<User>;
|
|
32
|
+
getUserProfile(): Promise<UserProfile>;
|
|
32
33
|
isLoading(): boolean;
|
|
33
34
|
isSignedIn(sessionId?: string): Promise<boolean>;
|
|
34
35
|
signIn(options?: SignInOptions, sessionId?: string, beforeSignIn?: (redirectUrl: string) => NextResponse, authorizationCode?: string, sessionState?: string, state?: string): Promise<User>;
|
|
@@ -15,12 +15,11 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoNodeClient, LegacyAsgardeoNodeClient,
|
|
19
|
-
// removeTrailingSlash,
|
|
20
|
-
} from '@asgardeo/node';
|
|
18
|
+
import { AsgardeoNodeClient, LegacyAsgardeoNodeClient, } from '@asgardeo/node';
|
|
21
19
|
import { NextResponse } from 'next/server';
|
|
22
20
|
import deleteSessionId from './server/actions/deleteSessionId';
|
|
23
21
|
import getSessionId from './server/actions/getSessionId';
|
|
22
|
+
import getIsSignedIn from './server/actions/isSignedIn';
|
|
24
23
|
import setSessionId from './server/actions/setSessionId';
|
|
25
24
|
import decorateConfigWithNextEnv from './utils/decorateConfigWithNextEnv';
|
|
26
25
|
import InternalAuthAPIRoutesConfig from './configs/InternalAuthAPIRoutesConfig';
|
|
@@ -38,27 +37,27 @@ class AsgardeoNextClient extends AsgardeoNodeClient {
|
|
|
38
37
|
this.asgardeo = new LegacyAsgardeoNodeClient();
|
|
39
38
|
}
|
|
40
39
|
initialize(config) {
|
|
41
|
-
const { baseUrl, clientId, clientSecret, afterSignInUrl } = decorateConfigWithNextEnv(
|
|
42
|
-
afterSignInUrl: config.afterSignInUrl,
|
|
43
|
-
baseUrl: config.baseUrl,
|
|
44
|
-
clientId: config.clientId,
|
|
45
|
-
clientSecret: config.clientSecret,
|
|
46
|
-
});
|
|
40
|
+
const { baseUrl, clientId, clientSecret, afterSignInUrl, ...rest } = decorateConfigWithNextEnv(config);
|
|
47
41
|
return this.asgardeo.initialize({
|
|
48
42
|
baseUrl,
|
|
49
|
-
|
|
43
|
+
clientId: clientId,
|
|
50
44
|
clientSecret,
|
|
51
|
-
|
|
45
|
+
afterSignInUrl: afterSignInUrl,
|
|
46
|
+
...rest,
|
|
52
47
|
});
|
|
53
48
|
}
|
|
54
|
-
getUser() {
|
|
49
|
+
async getUser(userId) {
|
|
50
|
+
let resolvedSessionId = userId || (await getSessionId());
|
|
51
|
+
return this.asgardeo.getUser(resolvedSessionId);
|
|
52
|
+
}
|
|
53
|
+
getUserProfile() {
|
|
55
54
|
throw new Error('Method not implemented.');
|
|
56
55
|
}
|
|
57
56
|
isLoading() {
|
|
58
57
|
return false;
|
|
59
58
|
}
|
|
60
59
|
isSignedIn(sessionId) {
|
|
61
|
-
return this.asgardeo.
|
|
60
|
+
return this.asgardeo.isSignedIn(sessionId);
|
|
62
61
|
}
|
|
63
62
|
async signIn(options, sessionId, beforeSignIn, authorizationCode, sessionState, state) {
|
|
64
63
|
let resolvedSessionId = sessionId || (await getSessionId());
|
|
@@ -81,7 +80,7 @@ class AsgardeoNextClient extends AsgardeoNodeClient {
|
|
|
81
80
|
if ((method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.signIn) || searchParams.get('code')) {
|
|
82
81
|
let response;
|
|
83
82
|
await this.signIn({}, undefined, (redirectUrl) => {
|
|
84
|
-
return response = NextResponse.redirect(redirectUrl, 302);
|
|
83
|
+
return (response = NextResponse.redirect(redirectUrl, 302));
|
|
85
84
|
}, searchParams.get('code'), searchParams.get('session_state'), searchParams.get('state'));
|
|
86
85
|
// If we already redirected via the callback, return that
|
|
87
86
|
if (response) {
|
|
@@ -98,13 +97,24 @@ class AsgardeoNextClient extends AsgardeoNodeClient {
|
|
|
98
97
|
}
|
|
99
98
|
if (method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.session) {
|
|
100
99
|
try {
|
|
101
|
-
const
|
|
102
|
-
return NextResponse.json({ isSignedIn:
|
|
100
|
+
const isSignedIn = await getIsSignedIn();
|
|
101
|
+
return NextResponse.json({ isSignedIn: isSignedIn });
|
|
103
102
|
}
|
|
104
103
|
catch (error) {
|
|
105
104
|
return NextResponse.json({ error: 'Failed to check session' }, { status: 500 });
|
|
106
105
|
}
|
|
107
106
|
}
|
|
107
|
+
if (method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.user) {
|
|
108
|
+
try {
|
|
109
|
+
const user = await this.getUser();
|
|
110
|
+
console.log('[AsgardeoNextClient] User fetched successfully:', user);
|
|
111
|
+
return NextResponse.json({ user });
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
console.error('[AsgardeoNextClient] Failed to get user:', error);
|
|
115
|
+
return NextResponse.json({ error: 'Failed to get user' }, { status: 500 });
|
|
116
|
+
}
|
|
117
|
+
}
|
|
108
118
|
if (method === 'GET' && sanitizedPathname === InternalAuthAPIRoutesConfig.signOut) {
|
|
109
119
|
try {
|
|
110
120
|
const afterSignOutUrl = await this.signOut();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsgardeoNextClient.js","sourceRoot":"","sources":["../src/AsgardeoNextClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAClB,wBAAwB
|
|
1
|
+
{"version":3,"file":"AsgardeoNextClient.js","sourceRoot":"","sources":["../src/AsgardeoNextClient.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EACL,kBAAkB,EAClB,wBAAwB,GAKzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAc,YAAY,EAAC,MA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;QACH,CAAC;QAED,mDAAmD;QACnD,iFAAiF;QACjF,yFAAyF;QACzF,mCAAmC;QACnC,4DAA4D;QAE5D,iBAAiB;QACjB,4FAA4F;QAC5F,sFAAsF;QACtF,4DAA4D;QAC5D,kBAAkB;QAClB,QAAQ;QACR,IAAI;QAEJ,OAAO,YAAY,CAAC,IAAI,EAAE,CAAC;IAC7B,CAAC;IAED,UAAU,CAAC,GAAgB;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3B,CAAC;CACF;AAED,eAAe,kBAAkB,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -29,39 +29,41 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
30
|
var index_exports = {};
|
|
31
31
|
__export(index_exports, {
|
|
32
|
-
AsgardeoContext: () => import_AsgardeoContext.default,
|
|
33
32
|
AsgardeoNext: () => import_AsgardeoNextClient.default,
|
|
34
33
|
AsgardeoProvider: () => import_AsgardeoProvider.default,
|
|
35
34
|
SignInButton: () => import_SignInButton.default,
|
|
36
35
|
SignOutButton: () => import_SignOutButton.default,
|
|
37
36
|
SignedIn: () => import_SignedIn.default,
|
|
37
|
+
SignedInProps: () => import_SignedIn2.SignedInProps,
|
|
38
38
|
SignedOut: () => import_SignedOut.default,
|
|
39
|
+
SignedOutProps: () => import_SignedOut2.SignedOutProps,
|
|
40
|
+
User: () => import_User.default,
|
|
39
41
|
isSignedIn: () => import_isSignedIn.default
|
|
40
42
|
});
|
|
41
43
|
module.exports = __toCommonJS(index_exports);
|
|
42
44
|
var import_AsgardeoProvider = __toESM(require("./server/AsgardeoProvider"), 1);
|
|
43
45
|
__reExport(index_exports, require("./server/AsgardeoProvider"), module.exports);
|
|
44
46
|
var import_isSignedIn = __toESM(require("./server/actions/isSignedIn"), 1);
|
|
45
|
-
var import_SignedIn = __toESM(require("./client/components/control/SignedIn"), 1);
|
|
46
|
-
|
|
47
|
-
var import_SignedOut = __toESM(require("./client/components/control/SignedOut"), 1);
|
|
48
|
-
|
|
49
|
-
var import_SignInButton = __toESM(require("./client/components/actions/SignInButton"), 1);
|
|
50
|
-
var import_SignOutButton = __toESM(require("./client/components/actions/SignOutButton"), 1);
|
|
51
|
-
var
|
|
47
|
+
var import_SignedIn = __toESM(require("./client/components/control/SignedIn/SignedIn"), 1);
|
|
48
|
+
var import_SignedIn2 = require("./client/components/control/SignedIn/SignedIn");
|
|
49
|
+
var import_SignedOut = __toESM(require("./client/components/control/SignedOut/SignedOut"), 1);
|
|
50
|
+
var import_SignedOut2 = require("./client/components/control/SignedOut/SignedOut");
|
|
51
|
+
var import_SignInButton = __toESM(require("./client/components/actions/SignInButton/SignInButton"), 1);
|
|
52
|
+
var import_SignOutButton = __toESM(require("./client/components/actions/SignOutButton/SignOutButton"), 1);
|
|
53
|
+
var import_User = __toESM(require("./client/components/presentation/User/User"), 1);
|
|
52
54
|
var import_AsgardeoNextClient = __toESM(require("./AsgardeoNextClient"), 1);
|
|
53
55
|
// Annotate the CommonJS export names for ESM import in node:
|
|
54
56
|
0 && (module.exports = {
|
|
55
|
-
AsgardeoContext,
|
|
56
57
|
AsgardeoNext,
|
|
57
58
|
AsgardeoProvider,
|
|
58
59
|
SignInButton,
|
|
59
60
|
SignOutButton,
|
|
60
61
|
SignedIn,
|
|
62
|
+
SignedInProps,
|
|
61
63
|
SignedOut,
|
|
64
|
+
SignedOutProps,
|
|
65
|
+
User,
|
|
62
66
|
isSignedIn,
|
|
63
|
-
...require("./server/AsgardeoProvider")
|
|
64
|
-
...require("./client/components/control/SignedIn"),
|
|
65
|
-
...require("./client/components/control/SignedOut")
|
|
67
|
+
...require("./server/AsgardeoProvider")
|
|
66
68
|
});
|
|
67
69
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nexport {default as AsgardeoProvider} from './server/AsgardeoProvider';\nexport * from './server/AsgardeoProvider';\n\nexport {default as isSignedIn} from './server/actions/isSignedIn';\n\nexport {default as SignedIn} from './client/components/control/SignedIn';\nexport
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA,8BAA0C;AAC1C,0BAAc,sCAnBd;AAqBA,wBAAoC;AAEpC,sBAAkC;AAClC,
|
|
6
|
-
"names": []
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).\n *\n * WSO2 LLC. licenses this file to you under the Apache License,\n * Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nexport {default as AsgardeoProvider} from './server/AsgardeoProvider';\nexport * from './server/AsgardeoProvider';\n\nexport {default as isSignedIn} from './server/actions/isSignedIn';\n\nexport {default as SignedIn} from './client/components/control/SignedIn/SignedIn';\nexport {SignedInProps} from './client/components/control/SignedIn/SignedIn';\n\nexport {default as SignedOut} from './client/components/control/SignedOut/SignedOut';\nexport {SignedOutProps} from './client/components/control/SignedOut/SignedOut';\n\nexport {default as SignInButton} from './client/components/actions/SignInButton/SignInButton';\nexport type {SignInButtonProps} from './client/components/actions/SignInButton/SignInButton';\n\nexport {default as SignOutButton} from './client/components/actions/SignOutButton/SignOutButton';\nexport type {SignOutButtonProps} from './client/components/actions/SignOutButton/SignOutButton';\n\nexport {default as User} from './client/components/presentation/User/User';\nexport type {UserProps} from './client/components/presentation/User/User';\n\nexport {default as AsgardeoNext} from './AsgardeoNextClient';\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBA,8BAA0C;AAC1C,0BAAc,sCAnBd;AAqBA,wBAAoC;AAEpC,sBAAkC;AAClC,IAAAA,mBAA4B;AAE5B,uBAAmC;AACnC,IAAAC,oBAA6B;AAE7B,0BAAsC;AAGtC,2BAAuC;AAGvC,kBAA8B;AAG9B,gCAAsC;",
|
|
6
|
+
"names": ["import_SignedIn", "import_SignedOut"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
19
|
+
import { BaseSignInButtonProps } from '@asgardeo/react';
|
|
20
|
+
/**
|
|
21
|
+
* Props interface of {@link SignInButton}
|
|
22
|
+
*/
|
|
23
|
+
export type SignInButtonProps = BaseSignInButtonProps;
|
|
24
|
+
/**
|
|
25
|
+
* SignInButton component that supports both render props and traditional props patterns for Next.js.
|
|
26
|
+
*
|
|
27
|
+
* @example Using render props
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <SignInButton>
|
|
30
|
+
* {({isLoading}) => (
|
|
31
|
+
* <button type="submit" disabled={isLoading}>
|
|
32
|
+
* {isLoading ? 'Signing in...' : 'Sign In'}
|
|
33
|
+
* </button>
|
|
34
|
+
* )}
|
|
35
|
+
* </SignInButton>
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Using traditional props
|
|
39
|
+
* ```tsx
|
|
40
|
+
* <SignInButton className="custom-button">Sign In</SignInButton>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @remarks
|
|
44
|
+
* In Next.js with server actions, the sign-in is handled via form submission.
|
|
45
|
+
* When using render props, the custom button should use `type="submit"` instead of `onClick={signIn}`.
|
|
46
|
+
* The `signIn` function in render props is provided for API consistency but should not be used directly.
|
|
47
|
+
*/
|
|
48
|
+
declare const SignInButton: ForwardRefExoticComponent<BaseSignInButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
49
|
+
export default SignInButton;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
'use client';
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { forwardRef } from 'react';
|
|
21
|
+
import InternalAuthAPIRoutesConfig from '../../../../configs/InternalAuthAPIRoutesConfig';
|
|
22
|
+
import { BaseSignInButton } from '@asgardeo/react';
|
|
23
|
+
/**
|
|
24
|
+
* SignInButton component that supports both render props and traditional props patterns for Next.js.
|
|
25
|
+
*
|
|
26
|
+
* @example Using render props
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <SignInButton>
|
|
29
|
+
* {({isLoading}) => (
|
|
30
|
+
* <button type="submit" disabled={isLoading}>
|
|
31
|
+
* {isLoading ? 'Signing in...' : 'Sign In'}
|
|
32
|
+
* </button>
|
|
33
|
+
* )}
|
|
34
|
+
* </SignInButton>
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example Using traditional props
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <SignInButton className="custom-button">Sign In</SignInButton>
|
|
40
|
+
* ```
|
|
41
|
+
*
|
|
42
|
+
* @remarks
|
|
43
|
+
* In Next.js with server actions, the sign-in is handled via form submission.
|
|
44
|
+
* When using render props, the custom button should use `type="submit"` instead of `onClick={signIn}`.
|
|
45
|
+
* The `signIn` function in render props is provided for API consistency but should not be used directly.
|
|
46
|
+
*/
|
|
47
|
+
const SignInButton = forwardRef(({ className, style, ...rest }, ref) => {
|
|
48
|
+
return (_jsx("form", { action: InternalAuthAPIRoutesConfig.signIn, children: _jsx(BaseSignInButton, { className: className, style: style, ref: ref, type: "submit", ...rest }) }));
|
|
49
|
+
});
|
|
50
|
+
SignInButton.displayName = 'SignInButton';
|
|
51
|
+
export default SignInButton;
|
|
52
|
+
//# sourceMappingURL=SignInButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignInButton.js","sourceRoot":"","sources":["../../../../../src/client/components/actions/SignInButton/SignInButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAC,UAAU,EAA8D,MAAM,OAAO,CAAC;AAC9F,OAAO,2BAA2B,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAC,gBAAgB,EAAwB,MAAM,iBAAiB,CAAC;AAOxE;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,YAAY,GAAG,UAAU,CAC7B,CAAC,EAAC,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAoB,EAAE,GAA2B,EAAgB,EAAE;IAC5F,OAAO,CACL,eAAM,MAAM,EAAE,2BAA2B,CAAC,MAAM,YAC9C,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,KAAK,IAAI,GAAI,GACrF,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,eAAe,YAAY,CAAC"}
|
package/dist/client/components/actions/{SignOutButton.d.ts → SignOutButton/SignOutButton.d.ts}
RENAMED
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC,
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { BaseSignOutButtonProps } from '@asgardeo/react';
|
|
19
20
|
/**
|
|
20
21
|
* Interface for SignInButton component props.
|
|
21
22
|
*/
|
|
22
|
-
export type SignOutButtonProps =
|
|
23
|
+
export type SignOutButtonProps = BaseSignOutButtonProps;
|
|
23
24
|
/**
|
|
24
25
|
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
25
26
|
*
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
'use client';
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { forwardRef } from 'react';
|
|
21
|
-
import InternalAuthAPIRoutesConfig from '
|
|
21
|
+
import InternalAuthAPIRoutesConfig from '../../../../configs/InternalAuthAPIRoutesConfig';
|
|
22
22
|
import { BaseSignOutButton } from '@asgardeo/react';
|
|
23
23
|
/**
|
|
24
24
|
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
@@ -37,6 +37,6 @@ import { BaseSignOutButton } from '@asgardeo/react';
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
const SignOutButton = forwardRef(({
|
|
40
|
+
const SignOutButton = forwardRef(({ className, style, ...rest }, ref) => (_jsx("form", { action: InternalAuthAPIRoutesConfig.signOut, children: _jsx(BaseSignOutButton, { className: className, style: style, ref: ref, type: "submit", ...rest }) })));
|
|
41
41
|
export default SignOutButton;
|
|
42
42
|
//# sourceMappingURL=SignOutButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignOutButton.js","sourceRoot":"","sources":["../../../../../src/client/components/actions/SignOutButton/SignOutButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAK,UAAU,EAAuC,MAAM,OAAO,CAAC;AAC3E,OAAO,2BAA2B,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAC,iBAAiB,EAAyB,MAAM,iBAAiB,CAAC;AAO1E;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,aAAa,GAA8C,UAAU,CAIzE,CAAC,EAAC,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAwC,EAAE,GAA2B,EAAgB,EAAE,CAAC,CACjH,eAAM,MAAM,EAAE,2BAA2B,CAAC,OAAO,YAC/C,KAAC,iBAAiB,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,KAAK,IAAI,GAAI,GACtF,CACR,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -15,11 +15,12 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { FC,
|
|
18
|
+
import { FC, PropsWithChildren } from 'react';
|
|
19
|
+
import { BaseSignUpButtonProps } from '@asgardeo/react';
|
|
19
20
|
/**
|
|
20
21
|
* Interface for SignInButton component props.
|
|
21
22
|
*/
|
|
22
|
-
export type SignUpButtonProps =
|
|
23
|
+
export type SignUpButtonProps = BaseSignUpButtonProps;
|
|
23
24
|
/**
|
|
24
25
|
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
25
26
|
*
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
'use client';
|
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { forwardRef } from 'react';
|
|
21
|
-
import InternalAuthAPIRoutesConfig from '
|
|
21
|
+
import InternalAuthAPIRoutesConfig from '../../../../configs/InternalAuthAPIRoutesConfig';
|
|
22
22
|
import { BaseSignUpButton } from '@asgardeo/react';
|
|
23
23
|
/**
|
|
24
24
|
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
@@ -37,6 +37,6 @@ import { BaseSignUpButton } from '@asgardeo/react';
|
|
|
37
37
|
* }
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
|
-
const SignUpButton = forwardRef(({
|
|
40
|
+
const SignUpButton = forwardRef(({ className, style, ...rest }, ref) => (_jsx("form", { action: InternalAuthAPIRoutesConfig.signUp, children: _jsx(BaseSignUpButton, { className: className, style: style, ref: ref, type: "submit", ...rest }) })));
|
|
41
41
|
export default SignUpButton;
|
|
42
42
|
//# sourceMappingURL=SignUpButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignUpButton.js","sourceRoot":"","sources":["../../../../../src/client/components/actions/SignUpButton/SignUpButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAK,UAAU,EAAuC,MAAM,OAAO,CAAC;AAC3E,OAAO,2BAA2B,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAC,gBAAgB,EAAwB,MAAM,iBAAiB,CAAC;AAOxE;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,YAAY,GAA6C,UAAU,CAIvE,CAAC,EAAC,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAuC,EAAE,GAA2B,EAAgB,EAAE,CAAC,CAChH,eAAM,MAAM,EAAE,2BAA2B,CAAC,MAAM,YAC9C,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,KAAK,IAAI,GAAI,GACrF,CACR,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
'use client';
|
|
19
19
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { useEffect, useState } from 'react';
|
|
21
|
-
import isSignedIn from '
|
|
21
|
+
import isSignedIn from '../../../../server/actions/isSignedIn';
|
|
22
22
|
/**
|
|
23
23
|
* A component that only renders its children when the user is signed in.
|
|
24
24
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedIn.js","sourceRoot":"","sources":["../../../../../src/client/components/control/SignedIn/SignedIn.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAmC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5E,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAY/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,QAAQ,GAAyC,CAAC,EACtD,QAAQ,EACR,QAAQ,GAAG,IAAI,GACkB,EAAE,EAAE;IACrC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAiB,IAAI,CAAC,CAAC;IAE3E,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAmB,EAAE;YACzB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAY,MAAM,UAAU,EAAE,CAAC;gBAE3C,iBAAiB,CAAC,MAAM,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEzC,OAAO,4BAAG,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAI,CAAC;AACrD,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
'use client';
|
|
19
19
|
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
20
20
|
import { useEffect, useState } from 'react';
|
|
21
|
-
import isSignedIn from '
|
|
21
|
+
import isSignedIn from '../../../../server/actions/isSignedIn';
|
|
22
22
|
/**
|
|
23
23
|
* A component that only renders its children when the user is signed out.
|
|
24
24
|
*
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignedOut.js","sourceRoot":"","sources":["../../../../../src/client/components/control/SignedOut/SignedOut.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAmC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5E,OAAO,UAAU,MAAM,uCAAuC,CAAC;AAY/D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,SAAS,GAA0C,CAAC,EACxD,QAAQ,EACR,QAAQ,GAAG,IAAI,GACmB,EAAE,EAAE;IACtC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAiB,IAAI,CAAC,CAAC;IAE3E,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAmB,EAAE;YACzB,IAAI,CAAC;gBACH,MAAM,MAAM,GAAY,MAAM,UAAU,EAAE,CAAC;gBAE3C,iBAAiB,CAAC,MAAM,CAAC,CAAC;YAC5B,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEzC,OAAO,4BAAG,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAI,CAAC;AACtD,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { FC, ReactNode } from 'react';
|
|
19
|
+
import { BaseUserProps } from '@asgardeo/react';
|
|
20
|
+
/**
|
|
21
|
+
* Props for the User component.
|
|
22
|
+
* Extends BaseUserProps but makes the user prop optional since it will be obtained from useAsgardeo
|
|
23
|
+
*/
|
|
24
|
+
export interface UserProps extends Omit<BaseUserProps, 'user'> {
|
|
25
|
+
/**
|
|
26
|
+
* Render prop that takes the user object and returns a ReactNode.
|
|
27
|
+
* @param user - The authenticated user object from Asgardeo.
|
|
28
|
+
* @returns A ReactNode to render.
|
|
29
|
+
*/
|
|
30
|
+
children: (user: any | null) => ReactNode;
|
|
31
|
+
/**
|
|
32
|
+
* Optional element to render when no user is signed in.
|
|
33
|
+
*/
|
|
34
|
+
fallback?: ReactNode;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A component that uses render props to expose the authenticated user object.
|
|
38
|
+
* This component automatically retrieves the user from Asgardeo context.
|
|
39
|
+
*
|
|
40
|
+
* @remarks This component is only supported in browser based React applications (CSR).
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* import { User } from '@asgardeo/auth-react';
|
|
45
|
+
*
|
|
46
|
+
* const App = () => {
|
|
47
|
+
* return (
|
|
48
|
+
* <User fallback={<p>Please sign in</p>}>
|
|
49
|
+
* {(user) => (
|
|
50
|
+
* <div>
|
|
51
|
+
* <h1>Welcome, {user.displayName}!</h1>
|
|
52
|
+
* <p>Email: {user.email}</p>
|
|
53
|
+
* </div>
|
|
54
|
+
* )}
|
|
55
|
+
* </User>
|
|
56
|
+
* );
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
declare const User: FC<UserProps>;
|
|
61
|
+
export default User;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
'use client';
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import useAsgardeo from '../../../contexts/Asgardeo/useAsgardeo';
|
|
21
|
+
import { BaseUser } from '@asgardeo/react';
|
|
22
|
+
/**
|
|
23
|
+
* A component that uses render props to expose the authenticated user object.
|
|
24
|
+
* This component automatically retrieves the user from Asgardeo context.
|
|
25
|
+
*
|
|
26
|
+
* @remarks This component is only supported in browser based React applications (CSR).
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* import { User } from '@asgardeo/auth-react';
|
|
31
|
+
*
|
|
32
|
+
* const App = () => {
|
|
33
|
+
* return (
|
|
34
|
+
* <User fallback={<p>Please sign in</p>}>
|
|
35
|
+
* {(user) => (
|
|
36
|
+
* <div>
|
|
37
|
+
* <h1>Welcome, {user.displayName}!</h1>
|
|
38
|
+
* <p>Email: {user.email}</p>
|
|
39
|
+
* </div>
|
|
40
|
+
* )}
|
|
41
|
+
* </User>
|
|
42
|
+
* );
|
|
43
|
+
* }
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
const User = ({ children, fallback = null }) => {
|
|
47
|
+
const { user } = useAsgardeo();
|
|
48
|
+
return (_jsx(BaseUser, { user: user, fallback: fallback, children: children }));
|
|
49
|
+
};
|
|
50
|
+
User.displayName = 'User';
|
|
51
|
+
export default User;
|
|
52
|
+
//# sourceMappingURL=User.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../../src/client/components/presentation/User/User.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAGb,OAAO,WAAW,MAAM,wCAAwC,CAAC;AACjE,OAAO,EAAC,QAAQ,EAAgB,MAAM,iBAAiB,CAAC;AAoBxD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,IAAI,GAAkB,CAAC,EAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,EAAC,EAAgB,EAAE;IACxE,MAAM,EAAC,IAAI,EAAC,GAAG,WAAW,EAAE,CAAC;IAE7B,OAAO,CACL,KAAC,QAAQ,IAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,YACrC,QAAQ,GACA,CACZ,CAAC;AACJ,CAAC,CAAC;AAEF,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC;AAE1B,eAAe,IAAI,CAAC"}
|
|
@@ -16,11 +16,18 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { AsgardeoContextProps as AsgardeoReactContextProps } from '@asgardeo/react';
|
|
19
|
+
import { User } from '@asgardeo/node';
|
|
19
20
|
import { Context } from 'react';
|
|
20
21
|
/**
|
|
21
22
|
* Props interface of {@link AsgardeoContext}
|
|
22
23
|
*/
|
|
23
|
-
export type AsgardeoContextProps = Partial<AsgardeoReactContextProps
|
|
24
|
+
export type AsgardeoContextProps = Partial<AsgardeoReactContextProps> & {
|
|
25
|
+
user?: User | null;
|
|
26
|
+
isSignedIn?: boolean;
|
|
27
|
+
isLoading?: boolean;
|
|
28
|
+
signIn?: () => void;
|
|
29
|
+
signOut?: () => void;
|
|
30
|
+
};
|
|
24
31
|
/**
|
|
25
32
|
* Context object for managing the Authentication flow builder core context.
|
|
26
33
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsgardeoContext.js","sourceRoot":"","sources":["../../../../src/client/contexts/Asgardeo/AsgardeoContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;AAIb,OAAO,EAAU,aAAa,EAAC,MAAM,OAAO,CAAC;AAa7C;;GAEG;AACH,MAAM,eAAe,GAAyC,aAAa,CAA8B,EAAE,CAAC,CAAC;AAE7G,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,eAAe,eAAe,CAAC"}
|
|
@@ -19,6 +19,11 @@ import { FC, PropsWithChildren } from 'react';
|
|
|
19
19
|
/**
|
|
20
20
|
* Props interface of {@link AsgardeoClientProvider}
|
|
21
21
|
*/
|
|
22
|
-
export type AsgardeoClientProviderProps = {
|
|
22
|
+
export type AsgardeoClientProviderProps = {
|
|
23
|
+
/**
|
|
24
|
+
* Preferences for theming, i18n, and other UI customizations.
|
|
25
|
+
*/
|
|
26
|
+
preferences?: any;
|
|
27
|
+
};
|
|
23
28
|
declare const AsgardeoClientProvider: FC<PropsWithChildren<AsgardeoClientProviderProps>>;
|
|
24
29
|
export default AsgardeoClientProvider;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
+
*
|
|
4
|
+
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
+
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
+
* in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing,
|
|
12
|
+
* software distributed under the License is distributed on an
|
|
13
|
+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
+
* KIND, either express or implied. See the License for the
|
|
15
|
+
* specific language governing permissions and limitations
|
|
16
|
+
* under the License.
|
|
17
|
+
*/
|
|
18
|
+
'use client';
|
|
19
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
+
import { useEffect, useMemo, useState } from 'react';
|
|
21
|
+
import { I18nProvider, FlowProvider, UserProvider, ThemeProvider } from '@asgardeo/react';
|
|
22
|
+
import AsgardeoContext from './AsgardeoContext';
|
|
23
|
+
import InternalAuthAPIRoutesConfig from '../../../configs/InternalAuthAPIRoutesConfig';
|
|
24
|
+
const AsgardeoClientProvider = ({ children, preferences, }) => {
|
|
25
|
+
const [isDarkMode, setIsDarkMode] = useState(false);
|
|
26
|
+
const [user, setUser] = useState(null);
|
|
27
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
28
|
+
const [isSignedIn, setIsSignedIn] = useState(false);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (!preferences?.theme?.mode || preferences.theme.mode === 'system') {
|
|
31
|
+
setIsDarkMode(window.matchMedia('(prefers-color-scheme: dark)').matches);
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
setIsDarkMode(preferences.theme.mode === 'dark');
|
|
35
|
+
}
|
|
36
|
+
}, [preferences?.theme?.mode]);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
const fetchUserData = async () => {
|
|
39
|
+
try {
|
|
40
|
+
setIsLoading(true);
|
|
41
|
+
const sessionResponse = await fetch(InternalAuthAPIRoutesConfig.session);
|
|
42
|
+
const sessionData = await sessionResponse.json();
|
|
43
|
+
setIsSignedIn(sessionData.isSignedIn);
|
|
44
|
+
if (sessionData.isSignedIn) {
|
|
45
|
+
const userResponse = await fetch(InternalAuthAPIRoutesConfig.user);
|
|
46
|
+
if (userResponse.ok) {
|
|
47
|
+
const userData = await userResponse.json();
|
|
48
|
+
setUser(userData);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
setUser(null);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
setUser(null);
|
|
57
|
+
setIsSignedIn(false);
|
|
58
|
+
}
|
|
59
|
+
finally {
|
|
60
|
+
setIsLoading(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
fetchUserData();
|
|
64
|
+
}, []);
|
|
65
|
+
const contextValue = useMemo(() => ({
|
|
66
|
+
user,
|
|
67
|
+
isSignedIn,
|
|
68
|
+
isLoading,
|
|
69
|
+
signIn: () => (window.location.href = InternalAuthAPIRoutesConfig.signIn),
|
|
70
|
+
signOut: () => (window.location.href = InternalAuthAPIRoutesConfig.signOut),
|
|
71
|
+
}), [user, isSignedIn, isLoading]);
|
|
72
|
+
return (_jsx(AsgardeoContext.Provider, { value: contextValue, children: _jsx(I18nProvider, { preferences: preferences?.i18n, children: _jsx(ThemeProvider, { theme: preferences?.theme?.overrides, defaultColorScheme: isDarkMode ? 'dark' : 'light', children: _jsx(FlowProvider, { children: _jsx(UserProvider, { profile: {
|
|
73
|
+
schemas: [],
|
|
74
|
+
profile: user || {},
|
|
75
|
+
flattenedProfile: user || {},
|
|
76
|
+
}, children: children }) }) }) }) }));
|
|
77
|
+
};
|
|
78
|
+
export default AsgardeoClientProvider;
|
|
79
|
+
//# sourceMappingURL=AsgardeoProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AsgardeoProvider.js","sourceRoot":"","sources":["../../../../src/client/contexts/Asgardeo/AsgardeoProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAwB,SAAS,EAAE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C,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,YACpG,KAAC,YAAY,cACX,KAAC,YAAY,IACX,OAAO,EAAE;4BACP,OAAO,EAAE,EAAE;4BACX,OAAO,EAAE,IAAI,IAAI,EAAE;4BACnB,gBAAgB,EAAE,IAAI,IAAI,EAAE;yBAC7B,YAEA,QAAQ,GACI,GACF,GACD,GACH,GACU,CAC5B,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -15,6 +15,6 @@
|
|
|
15
15
|
* specific language governing permissions and limitations
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
|
-
import { AsgardeoContextProps } from '
|
|
18
|
+
import { AsgardeoContextProps } from './AsgardeoContext';
|
|
19
19
|
declare const useAsgardeo: () => AsgardeoContextProps;
|
|
20
20
|
export default useAsgardeo;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
'use client';
|
|
19
19
|
import { useContext } from 'react';
|
|
20
|
-
import AsgardeoContext from '
|
|
20
|
+
import AsgardeoContext from './AsgardeoContext';
|
|
21
21
|
const useAsgardeo = () => {
|
|
22
22
|
const context = useContext(AsgardeoContext);
|
|
23
23
|
if (!context) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAsgardeo.js","sourceRoot":"","sources":["../../../../src/client/contexts/Asgardeo/useAsgardeo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;AAEb,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,eAAuC,MAAM,mBAAmB,CAAC;AAExE,MAAM,WAAW,GAAG,GAAyB,EAAE;IAC7C,MAAM,OAAO,GAAgC,UAAU,CAAC,eAAe,CAAC,CAAC;IAEzE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalAuthAPIRoutesConfig.js","sourceRoot":"","sources":["../../src/configs/InternalAuthAPIRoutesConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,2BAA2B,GAA0B;IACzD,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,kBAAkB;IAC1B,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"InternalAuthAPIRoutesConfig.js","sourceRoot":"","sources":["../../src/configs/InternalAuthAPIRoutesConfig.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAIH,MAAM,2BAA2B,GAA0B;IACzD,IAAI,EAAE,gBAAgB;IACtB,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,kBAAkB;IAC1B,OAAO,EAAE,mBAAmB;IAC5B,MAAM,EAAE,SAAS;CAClB,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
export { default as AsgardeoProvider } from './server/AsgardeoProvider';
|
|
19
19
|
export * from './server/AsgardeoProvider';
|
|
20
20
|
export { default as isSignedIn } from './server/actions/isSignedIn';
|
|
21
|
-
export { default as SignedIn } from './client/components/control/SignedIn';
|
|
22
|
-
export
|
|
23
|
-
export { default as SignedOut } from './client/components/control/SignedOut';
|
|
24
|
-
export
|
|
25
|
-
export { default as SignInButton } from './client/components/actions/SignInButton';
|
|
26
|
-
export type { SignInButtonProps } from './client/components/actions/SignInButton';
|
|
27
|
-
export { default as SignOutButton } from './client/components/actions/SignOutButton';
|
|
28
|
-
export type { SignOutButtonProps } from './client/components/actions/SignOutButton';
|
|
29
|
-
export { default as
|
|
30
|
-
export type {
|
|
21
|
+
export { default as SignedIn } from './client/components/control/SignedIn/SignedIn';
|
|
22
|
+
export { SignedInProps } from './client/components/control/SignedIn/SignedIn';
|
|
23
|
+
export { default as SignedOut } from './client/components/control/SignedOut/SignedOut';
|
|
24
|
+
export { SignedOutProps } from './client/components/control/SignedOut/SignedOut';
|
|
25
|
+
export { default as SignInButton } from './client/components/actions/SignInButton/SignInButton';
|
|
26
|
+
export type { SignInButtonProps } from './client/components/actions/SignInButton/SignInButton';
|
|
27
|
+
export { default as SignOutButton } from './client/components/actions/SignOutButton/SignOutButton';
|
|
28
|
+
export type { SignOutButtonProps } from './client/components/actions/SignOutButton/SignOutButton';
|
|
29
|
+
export { default as User } from './client/components/presentation/User/User';
|
|
30
|
+
export type { UserProps } from './client/components/presentation/User/User';
|
|
31
31
|
export { default as AsgardeoNext } from './AsgardeoNextClient';
|
package/dist/index.js
CHANGED
|
@@ -18,12 +18,10 @@
|
|
|
18
18
|
export { default as AsgardeoProvider } from './server/AsgardeoProvider';
|
|
19
19
|
export * from './server/AsgardeoProvider';
|
|
20
20
|
export { default as isSignedIn } from './server/actions/isSignedIn';
|
|
21
|
-
export { default as SignedIn } from './client/components/control/SignedIn';
|
|
22
|
-
export
|
|
23
|
-
export { default as
|
|
24
|
-
export
|
|
25
|
-
export { default as
|
|
26
|
-
export { default as SignOutButton } from './client/components/actions/SignOutButton';
|
|
27
|
-
export { default as AsgardeoContext } from './client/contexts/AsgardeoContext';
|
|
21
|
+
export { default as SignedIn } from './client/components/control/SignedIn/SignedIn';
|
|
22
|
+
export { default as SignedOut } from './client/components/control/SignedOut/SignedOut';
|
|
23
|
+
export { default as SignInButton } from './client/components/actions/SignInButton/SignInButton';
|
|
24
|
+
export { default as SignOutButton } from './client/components/actions/SignOutButton/SignOutButton';
|
|
25
|
+
export { default as User } from './client/components/presentation/User/User';
|
|
28
26
|
export { default as AsgardeoNext } from './AsgardeoNextClient';
|
|
29
27
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AACtE,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAC,OAAO,IAAI,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAElE,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,+CAA+C,CAAC;AAGlF,OAAO,EAAC,OAAO,IAAI,SAAS,EAAC,MAAM,iDAAiD,CAAC;AAGrF,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,uDAAuD,CAAC;AAG9F,OAAO,EAAC,OAAO,IAAI,aAAa,EAAC,MAAM,yDAAyD,CAAC;AAGjG,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,4CAA4C,CAAC;AAG3E,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,sBAAsB,CAAC"}
|
package/dist/models/api.d.ts
CHANGED
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
* These routes are used internally by the Asgardeo Next.js SDK for handling authentication flows.
|
|
21
21
|
*/
|
|
22
22
|
export interface InternalAuthAPIRoutes {
|
|
23
|
+
/**
|
|
24
|
+
* Route for handling user information retrieval.
|
|
25
|
+
* This route should return the current user's information, such as username, email, etc.
|
|
26
|
+
*/
|
|
27
|
+
user: string;
|
|
23
28
|
/**
|
|
24
29
|
* Route for handling session management.
|
|
25
30
|
* This route should return the current signed-in status.
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* under the License.
|
|
17
17
|
*/
|
|
18
18
|
import { FC, PropsWithChildren } from 'react';
|
|
19
|
-
import { AsgardeoClientProviderProps } from '../client/
|
|
19
|
+
import { AsgardeoClientProviderProps } from '../client/contexts/Asgardeo/AsgardeoProvider';
|
|
20
20
|
/**
|
|
21
21
|
* Props interface of {@link AsgardeoServerProvider}
|
|
22
22
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import AsgardeoClientProvider from '../client/
|
|
2
|
+
import AsgardeoClientProvider from '../client/contexts/Asgardeo/AsgardeoProvider';
|
|
3
3
|
/**
|
|
4
4
|
* Server-side provider component for Asgardeo authentication.
|
|
5
5
|
* Wraps the client-side provider and handles server-side authentication logic.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AsgardeoProvider.js","sourceRoot":"","sources":["../../src/server/AsgardeoProvider.tsx"],"names":[],"mappings":";AAmBA,OAAO,sBAAqD,MAAM,
|
|
1
|
+
{"version":3,"file":"AsgardeoProvider.js","sourceRoot":"","sources":["../../src/server/AsgardeoProvider.tsx"],"names":[],"mappings":";AAmBA,OAAO,sBAAqD,MAAM,8CAA8C,CAAC;AAOjH;;;;;;;;;;;;;;GAcG;AACH,MAAM,sBAAsB,GAAuD,CAAC,EAClF,QAAQ,GACuC,EAAgB,EAAE,CAAC,CAClE,KAAC,sBAAsB,cAAE,QAAQ,GAA0B,CAC5D,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@asgardeo/nextjs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "Next.js implementation of Asgardeo JavaScript SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"asgardeo",
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"react",
|
|
9
9
|
"ssr"
|
|
10
10
|
],
|
|
11
|
-
"homepage": "https://github.com/asgardeo/
|
|
11
|
+
"homepage": "https://github.com/asgardeo/web-ui-sdks/tree/main/packages/next#readme",
|
|
12
12
|
"bugs": {
|
|
13
|
-
"url": "https://github.com/asgardeo/
|
|
13
|
+
"url": "https://github.com/asgardeo/web-ui-sdks/issues"
|
|
14
14
|
},
|
|
15
15
|
"author": "WSO2",
|
|
16
16
|
"license": "Apache-2.0",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
"types": "dist/index.d.ts",
|
|
31
31
|
"repository": {
|
|
32
32
|
"type": "git",
|
|
33
|
-
"url": "https://github.com/asgardeo/
|
|
33
|
+
"url": "https://github.com/asgardeo/web-ui-sdks",
|
|
34
34
|
"directory": "packages/next"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@types/react": "^19.1.4",
|
|
38
38
|
"tslib": "^2.8.1",
|
|
39
|
-
"@asgardeo/node": "^0.0.
|
|
40
|
-
"@asgardeo/react": "^0.
|
|
39
|
+
"@asgardeo/node": "^0.0.2",
|
|
40
|
+
"@asgardeo/react": "^0.4.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^22.15.3",
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
import { FC, HTMLAttributes, PropsWithChildren } from 'react';
|
|
19
|
-
/**
|
|
20
|
-
* Props interface of {@link SignInButton}
|
|
21
|
-
*/
|
|
22
|
-
export type SignInButtonProps = HTMLAttributes<HTMLButtonElement>;
|
|
23
|
-
/**
|
|
24
|
-
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* import { SignInButton } from '@asgardeo/auth-react';
|
|
29
|
-
*
|
|
30
|
-
* const App = () => {
|
|
31
|
-
* const buttonRef = useRef<HTMLButtonElement>(null);
|
|
32
|
-
* return (
|
|
33
|
-
* <SignInButton ref={buttonRef} className="custom-class" style={{ backgroundColor: 'blue' }}>
|
|
34
|
-
* Sign In
|
|
35
|
-
* </SignInButton>
|
|
36
|
-
* );
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
declare const SignInButton: FC<PropsWithChildren<SignInButtonProps>>;
|
|
41
|
-
export default SignInButton;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
'use client';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { forwardRef } from 'react';
|
|
21
|
-
import InternalAuthAPIRoutesConfig from '../../../configs/InternalAuthAPIRoutesConfig';
|
|
22
|
-
import { BaseSignInButton } from '@asgardeo/react';
|
|
23
|
-
/**
|
|
24
|
-
* SignInButton component. This button initiates the sign-in process when clicked.
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```tsx
|
|
28
|
-
* import { SignInButton } from '@asgardeo/auth-react';
|
|
29
|
-
*
|
|
30
|
-
* const App = () => {
|
|
31
|
-
* const buttonRef = useRef<HTMLButtonElement>(null);
|
|
32
|
-
* return (
|
|
33
|
-
* <SignInButton ref={buttonRef} className="custom-class" style={{ backgroundColor: 'blue' }}>
|
|
34
|
-
* Sign In
|
|
35
|
-
* </SignInButton>
|
|
36
|
-
* );
|
|
37
|
-
* }
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
const SignInButton = forwardRef(({ children = 'Sign In', className, style, ...rest }, ref) => (_jsx("form", { action: InternalAuthAPIRoutesConfig.signIn, children: _jsx(BaseSignInButton, { className: className, style: style, ref: ref, type: "submit", ...rest, children: children }) })));
|
|
41
|
-
export default SignInButton;
|
|
42
|
-
//# sourceMappingURL=SignInButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignInButton.js","sourceRoot":"","sources":["../../../../src/client/components/actions/SignInButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAK,UA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ACf,CACR,CACF,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignUpButton.js","sourceRoot":"","sources":["../../../../src/client/components/actions/SignUpButton.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAK,UAAU,EAAuD,MAAM,OAAO,CAAC;AAC3F,OAAO,2BAA2B,MAAM,8CAA8C,CAAC;AACvF,OAAO,EAAC,gBAAgB,EAAC,MAAM,iBAAiB,CAAC;AAOjD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,YAAY,GAA6C,UAAU,CAIvE,CACE,EAAC,QAAQ,GAAG,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,EAAuC,EACvF,GAA2B,EACb,EAAE,CAAC,CACjB,eAAM,MAAM,EAAE,2BAA2B,CAAC,MAAM,YAC9C,KAAC,gBAAgB,IAAC,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,QAAQ,KAAK,IAAI,YACnF,QAAQ,GACQ,GACd,CACR,CACF,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SignedIn.js","sourceRoot":"","sources":["../../../../src/client/components/control/SignedIn.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAEb,OAAO,EAAmC,SAAS,EAAE,QAAQ,EAAC,MAAM,OAAO,CAAC;AAC5E,OAAO,UAAU,MAAM,oCAAoC,CAAC;AAY5D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,QAAQ,GAAyC,CAAC,EACtD,QAAQ,EACR,QAAQ,GAAG,IAAI,GACkB,EAAE,EAAE;IACrC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAiB,IAA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K,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC,CAAC,EAAE,CAAC;IACP,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,IAAI,cAAc,KAAK,IAAI;QAAE,OAAO,IAAI,CAAC;IAEzC,OAAO,4BAAG,CAAC,cAAc,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,GAAI,CAAC;AACtD,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AsgardeoContext.js","sourceRoot":"","sources":["../../../src/client/contexts/AsgardeoContext.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;AAGb,OAAO,EAAU,aAAa,EAAC,MAAM,OAAO,CAAC;AAO7C;;GAEG;AACH,MAAM,eAAe,GAAyC,aAAa,CAA8B,EAAE,CAAC,CAAC;AAE7G,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAEhD,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAsgardeo.js","sourceRoot":"","sources":["../../../src/client/hooks/useAsgardeo.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;AAEb,OAAO,EAAC,UAAU,EAAC,MAAM,OAAO,CAAC;AACjC,OAAO,eAAuC,MAAM,6BAA6B,CAAC;AAElF,MAAM,WAAW,GAAG,GAAyB,EAAE;IAC7C,MAAM,OAAO,GAAgC,UAAU,CAAC,eAAe,CAAC,CAAC;IAEzE,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,qDAAqD,CAAC,CAAC;IACzE,CAAC;IAED,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) 2025, WSO2 LLC. (https://www.wso2.com).
|
|
3
|
-
*
|
|
4
|
-
* WSO2 LLC. licenses this file to you under the Apache License,
|
|
5
|
-
* Version 2.0 (the "License"); you may not use this file except
|
|
6
|
-
* in compliance with the License.
|
|
7
|
-
* You may obtain a copy of the License at
|
|
8
|
-
*
|
|
9
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
-
*
|
|
11
|
-
* Unless required by applicable law or agreed to in writing,
|
|
12
|
-
* software distributed under the License is distributed on an
|
|
13
|
-
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
14
|
-
* KIND, either express or implied. See the License for the
|
|
15
|
-
* specific language governing permissions and limitations
|
|
16
|
-
* under the License.
|
|
17
|
-
*/
|
|
18
|
-
'use client';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import AsgardeoContext from '../contexts/AsgardeoContext';
|
|
21
|
-
const AsgardeoClientProvider = ({ children, }) => (_jsx(AsgardeoContext.Provider, { value: {}, children: children }));
|
|
22
|
-
export default AsgardeoClientProvider;
|
|
23
|
-
//# sourceMappingURL=AsgardeoProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AsgardeoProvider.js","sourceRoot":"","sources":["../../../src/client/providers/AsgardeoProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,YAAY,CAAC;;AAGb,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAO1D,MAAM,sBAAsB,GAAuD,CAAC,EAClF,QAAQ,GACuC,EAAE,EAAE,CAAC,CACpD,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,YAAG,QAAQ,GAA4B,CAC3E,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|