force-rest-api
force-rest-api copied to clipboard
added id and instance_url to ApiSession
According to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/intro_understanding_web_server_oauth_flow.htm the instance_url and id are returned when a request is made for an access token in exchange for an authorization code (your Auth.completeOAuthWebServerFlow method that returns an ApiSession).
Although not required for further requests to the Force.com REST API, these may be useful in other actions (e.g. directing the user to their connected apps management page, identifying the pod for their instance, identifying and querying for more information about the user, etc.). So it may be useful to expose these rather than lose them.