Ionic 3 checkSession : can't refresh token

I followed this tutorial to get a nice login popup. it work well but now i want to implement refresh token. Sadly i didnt found any relevant example and I’m struggling to implement it.
I have a method doing :

    scope: 'openid profile offline_access',
    responseType: 'token id_token',
    redirectUri: 'io.ionic.starter://'

And then I got Uncaught (in promise): TypeError: Cannot read property 'protocol' of null . The provided redirectUri is from the former tutorial, it’s working for login.

Can you help me ? thanks

If i change the redirect_uri :

Object {original: Object, code: “origin_mismatch”, description: “The redirectUri’s origin ( should match the window’s origin (file://).”, error: “origin_mismatch”, error_description: “The redirectUri’s origin ( should match the window’s origin (file://).”}

When I use the redirect_uri file:// i’ve got : 403 ()
Object {original: Object, code: "timeout", description: "Timeout during executing web_message communication", error: "timeout", error_description: "Timeout during executing web_message communication"}

And the CURL request :

Callback URL mismatch.
The provided redirect_uri is not in the list of allowed callback URLs.
Please go to the [Application Settings page]( and make sure you are sending a valid callback url from your application.

And then, if I add file:// in the allowed callback url i’ve got :

There could be a misconfiguration in the system or a service outage. We track these errors automatically, but if the problem persists feel free to contact us.
Please try again.

Any help ?

Resolved, i had to upgrade cordova webview plugin. Old version was using file://

1 Like

Perfect you figured it out and thanks for sharing with the rest of community!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.