onairos 0.1.239 → 0.1.241
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/components/OthentButton.js +11 -1
- package/dist/onairos.bundle.js +1 -1
- package/dist/onairos.bundle.js.map +1 -1
- package/dist/onairos.js +42 -3
- package/package.json +1 -1
- package/src/components/OthentButton.jsx +24 -10
- package/src/onairos.jsx +47 -3
|
@@ -29,11 +29,21 @@ function OthentButton(_ref) {
|
|
|
29
29
|
version: "1.0.0",
|
|
30
30
|
env: "production"
|
|
31
31
|
};
|
|
32
|
+
const getCallbackURL = () => {
|
|
33
|
+
// Dynamically determine the base URL
|
|
34
|
+
const baseUrl = window.location.origin; // e.g., https://internship.onairos.uk
|
|
35
|
+
return `${baseUrl}/onairos-callback`;
|
|
36
|
+
};
|
|
32
37
|
const othent = new _kms.Othent({
|
|
33
38
|
appInfo,
|
|
34
|
-
throwErrors: false
|
|
39
|
+
throwErrors: false,
|
|
40
|
+
auth0LogInMethod: "redirect",
|
|
41
|
+
auth0RedirectURI: window.location.href,
|
|
42
|
+
// The current page URL for redirection after login
|
|
43
|
+
auth0ReturnToURI: window.location.href // Same for logout
|
|
35
44
|
});
|
|
36
45
|
const userDetails = await othent.connect();
|
|
46
|
+
console.log("Valid user details??");
|
|
37
47
|
if (!userDetails) {
|
|
38
48
|
throw new Error('Othent connection failed');
|
|
39
49
|
}
|