1

We created a simple iOS native app, which should allow users to login into SF once and then open Lightning community app in a Webview. For this purposes we have below steps:


  1. User launch the mobile app;
  2. App calls Mobile SDK, which redirects to community login page, where user enters login and password; That allows us to get and refresh session token if this is required.
  3. We get an authorization token and passing community URL + token into WebView.
  4. We tried to pass authorization using frontoor.jsp or passing token as a parameter like:

    let request = try! URLRequest(url: URL(string: "<Link to community page>")!, method: .get, headers: ["Authorization" : "Bearer \(token!)"])` 
    

Both ways works fine when I try to open classic SF page or application. But when I try to open Community page it asks login again. So that means that those ways does not work with a community pages.

How can I pass authorization token to a Webview for a community users?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.