Unable to fetch a refresh token in angular + ionic project

I have created a project ionic + angular using the oktadev/schematics, the issue is when the initial acess token is going to expire it makes a request to the token endpoint which fails and asks to change the grant type. can anyboday please help out looking into this issue ?

At this time, Okta will only return a refresh token to a backend, though we are looking to add this support for SPAs in the future.

If you are looking to renew tokens in a SPA, you can instead do silent token renewal by making an authorize request with the parameter prompt=none. This will rely on there being an Okta session cookie available in the user’s browser. Otherwise, the user will need to re-authenticate in order to get new, valid tokens.