Last active
March 20, 2021 16:07
-
-
Save junojisan/8da473e2bf5af42249ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public PageReference initiate(){ | |
String authorizeUrl = | |
'https://login.salesforce.com/services/oauth2/authorize'; | |
authorizeUrl += '?response_type=code'; | |
authorizeUrl += '&client_id=' + CLIENT_ID; | |
authorizeUrl += '&redirect_uri=' + CALLBACK_URL; | |
authorizeUrl += '&prompt=login consent'; | |
PageReference pref = new PageReference(authorizeUrl); | |
pref.setRedirect(true); | |
return pref; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment