I am using the OAuth 2.0 User-Agent Flow for Desktop or Mobile App Integration to authenticate my connected app.
My redirect Url is:
https://login.salesforce.com/services/oauth2/authorize? client_id=<CLIENT_ID>& redirect_uri=<HOST_URL>/services/oauth2/success& response_type=token& scope=full refresh_token
I get this error:
error=invalid_scope& error_description=the requested scope is not available
If I use
scope=full, I am able to login and get the access token, but not the refresh token.
As per this answer, using
redirect_uri=http://localhost works as expected, but I want to redirect to my webapp.
This answer suggests using
http:// instead of
https:// for the callback url scheme, but Salesforce gives the error:
Callback URL: Cannot be an HTTP url.
Thank you for your time.