After a user authenticaes in our Org using the SSO oauth flow, and after the access token is created, we would like to hook into that flow to get that access token and set a couple of cookies.
Is this possible?
Is there a hook in the Apex code somewhere or can we set the callback URL of the oauth request to our own Apex class to intercept (and in this case, how do we "login" the user)?
-- An alternative if there is no built-in mechanism for us to grab the access token is to define the callback for the "authorization token" to an apex class, and from there make the oauth request for the access token, store that token and then "login" the user.
Im not sure what "login the user" exactly means in salesforce or how to do it.
Does anyone have any sample code that makes the call to get the access token and/or "login" the user.