function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
dipu12dipu12 

Launch web browser using OAuth token or SID

Is it possible to launch web browser from Hybrid App using the OAuth token? 

I would like the user to login using hybrid app and then launch the web browser and do not require the user to login again.

 

Thanks,

Dipu

Best Answer chosen by Admin (Salesforce Developers) 
Pat PattersonPat Patterson

Yes - if you really want to do this, you can specify the web scope when you request the token and then use the 'front door' url with the token and a retURL - e.g.

 

http://[instance].salesforce.com/secur/frontdoor.jsp?sid=[access token]&retURL=[start page]

 

Note that start page must be a relative URL in the org - e.g. /001/o

 

 

All Answers

AshwaniAshwani

Hi,

 

Hybrid app  run on web browser embedded in your app. So why you need exernal browser? Clicking on a link in hybrid app if it is on enbedded web UI it will open in that web ui. If link is through native then in that case you can trigger an event which open the link in that embedded web ui in your application.

 

 

Thanks.

Gaurav KheterpalGaurav Kheterpal

+1 on what Ashwani mentioned. Is there a specific requirement for which you want to use the browser instead of the built-in Webview?

Pat PattersonPat Patterson

Yes - if you really want to do this, you can specify the web scope when you request the token and then use the 'front door' url with the token and a retURL - e.g.

 

http://[instance].salesforce.com/secur/frontdoor.jsp?sid=[access token]&retURL=[start page]

 

Note that start page must be a relative URL in the org - e.g. /001/o

 

 

This was selected as the best answer