What is the access token expire duration in ERPNext. When request the new access token, it say it is one hour (3600 seconds), but if the token is exist more then 1 minute even refresh token is expiring. Why? Do some body has solution for this?
What i did is in the first authorization, the auth_code, refresh_token and access_token store in database. And when the access token is expire, then the take the refresh token from database and request for new access token.
But in my case if i request the new access token after one minute, then API is returning nothing. Why?
I want to set up oauth for android app to access api and I’ve followed your step but can’t get it worked.
Here’s what i did:
my server ip: eg: http://35.198.111.111
Social Login Keys:
Frappe Client ID: (blank)
Frappe Client Secret: (blank)
Frappe Server URL: http://35.198.111.111/
error: Unable to make request to the Frappe Server URL
I’m really not sure what to put in Redirect URIs, Default Redirect URI, Frappe Server URL.
You’ve to register your client here on Provider Server. This is just client registration.
Actual client is the android app / web app / third party app. So the redirect uri while “registration” is always the one your app is hosted on. In case of Android something your app can catch example oauth://authenticator
In case of android there is already an account authenticator library available GitHub - mntechnique/OAuth2Authenticator. That adds an Android’s AccountManager > Account
For the social login keys error: Social login key has been refactored. It is available on frappe/develop branch you can test that.
I’ll suggest checkout GitHub - frappe/frappekt I and Zarrar are working on it. It is a library to build frappe apps on native android. You can help? We can build apps faster then!!