asgardeo / asgardeo-auth-react-sdk

To maintain the implementation of Asgardeo React authentication SDK

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No refresh token found error when trying to use React SDK on Stackblitz

pavinduLakshan opened this issue · comments

Describe the issue:

I'm trying to create a demo using the React SDK in Stackblitz Cloud IDE.

https://stackblitz.com/edit/stackblitz-starters-kcgygm?file=src%2Findex.tsx

I have configured an application and updated the configs accordingly. This is the protocol configs of the app I use.

Screenshot 2023-08-06 at 21 47 09

However, when I click on the Sign In button, nothing happens and I see the following log in Stackblitz console.

{
  message: "There was no refresh token found. Asgardeo doesn't return a refresh token if the refresh token grant is not enabled.", 
  name: "No refresh token found.", 
  code: "SPA-AUTH_HELPER-HR-SE01"
}

The following error can be seen in the browser console.

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'toString')
    at S.eval (main.js:2:205363)
    at Generator.next (<anonymous>)
    at a (main.js:2:191464)

Screenshot 2023-08-06 at 21 55 42

How to reproduce:

  1. Fork the Stackblitz project https://stackblitz.com/edit/stackblitz-starters-kcgygm?file=src%2Findex.tsx
  2. Create an application in Asgardeo console and update the configs accordingly in src/index.tsx
  3. Click on the Sign In button and observe the console output.

Expected behavior:

Should be able to use React SDK on cloud IDEs such as Stackblitz, CodeSandbox etc.

Environment information (Please complete the following information; remove any unnecessary fields) :

  • Product Version: [e.g., IS 5.10.0, IS 5.9.0]
  • OS: Mac
  • Database: [e.g., MySQL, H2]
  • Userstore: [e.g., LDAP, JDBC]

Optional Fields

Related issues:

Suggested labels: