Own AccountManager and OAuth2

78 Views Asked by At

I did oauth2 authorisation on some site. This is classical way with WebView and page there, where user adds password and login, presses Allow button etc. Then it gets refresh_token and by another POST message gets auth_token, which I have to store (in AccountManager) and user later.

Can I do this with the help of AccountManager? How can I do this? I wonder if user should enter a login and password twice - one for account manager (when I should create it), and other in WebView form?

I just need to use AccountManager in order to sync data lately.

1

There are 1 best solutions below

0
On

Don't know if you still looking for a solution on this.

Short answer it's yes u can this example may give you the inspiration you need : https://github.com/learning-layers/android-openid-connect It goes a little futher supporting OIDC workflow.

The author is working on a lib maybe it's worth looking for this release.