Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/lazy-forks-sneeze.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@asgardeo/react': patch
'@asgardeo/javascript': patch
---

Fix `SignInButton` issue with `AsgardeoV2`
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ Follow these simple steps to get started with Asgardeo:

Please read [Contributing Guide](CONTRIBUTING.md) for details on how to contribute to Asgardeo JavaScript SDKs. Refer to [General Contribution Guidelines](http://wso2.github.io/) for details on our code of conduct, and the process for submitting pull requests to us.

### Contributors ❤️

Hats off to all the people who have contributed to this project, including those who created issues and participated in discussions. 🙌

<a href="https://github.com/asgardeo/javascript/graphs/contributors">
<img src="https://contrib.rocks/image?repo=asgardeo/javascript" />
</a>

### Reporting issues

We encourage you to report issues, improvements, and feature requests creating [Github Issues](https://github.com/asgardeo/javascript/issues).
Expand Down
2 changes: 0 additions & 2 deletions packages/javascript/src/models/embedded-flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
* under the License.
*/

import {Platform} from './platforms';

export enum EmbeddedFlowType {
Authentication = 'AUTHENTICATION',
Registration = 'REGISTRATION',
Expand Down
3 changes: 2 additions & 1 deletion packages/react/src/AsgardeoReactClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
Config,
TokenExchangeRequestConfig,
Platform,
isEmpty,
} from '@asgardeo/browser';
import AuthAPI from './__temp__/api';
import getMeOrganizations from './api/getMeOrganizations';
Expand Down Expand Up @@ -334,7 +335,7 @@ class AsgardeoReactClient<T extends AsgardeoReactConfig = AsgardeoReactConfig> e

const config: AsgardeoReactConfig = (await this.asgardeo.getConfigData()) as AsgardeoReactConfig;

if (config.platform === Platform.AsgardeoV2) {
if (config.platform === Platform.AsgardeoV2 && typeof arg1 === 'object' && !isEmpty(arg1)) {
const sessionDataKey: string = new URL(window.location.href).searchParams.get('sessionDataKey');

return executeEmbeddedSignInFlowV2({
Expand Down
2 changes: 1 addition & 1 deletion packages/react/src/contexts/Asgardeo/AsgardeoProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ const AsgardeoProvider: FC<PropsWithChildren<AsgardeoProviderProps>> = ({
useEffect(() => {
// TEMPORARY: Asgardeo V2 platform does not support branding preference yet.
// Tracker: https://github.com/asgardeo/javascript/issues/212
if (config.platform !== Platform.AsgardeoV2) {
if (config.platform === Platform.AsgardeoV2) {
return;
}

Expand Down
Loading