I’m creating a flutter app, do anyone know how to save the credentials? The quickstart does not show how to do this (unlike the iOS Swift Quickstart), and I could not find anything on the docs.
Good question - After logging in you get a Credentials instance which contains an access token and an ID token (which in turn contains the user profile data, that is exposed through the user property as well). That is, the SDK should handle storing the credentials for you.
Thanks @tyf. However, I don’t think that the credentials are being saved. I’ll double check again, but last time, I had to after leaving my app, and when the popup appears, I don’t have to sign in and it redirects to logged in page.
Instance of 'Credentials' is when I log in and it successfully logs my credentials
Then when I exit the tab and re-enter it, I get null, showing that when I initialize:
Credentials? _credentials;
It does not store the credentials when I do:
setState(() {
_credentials = credentials;
});
What I think is that I’m probably saving the credentials but not using the credentialsManager hasValidCredentials. I’ll look into the credential manager api and try and figure it out.