• Umang Lahane
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
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 token as a parameter like:

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

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.
So how can I pass authorization token to a Webview for a community users? Any help would be appreciated! Thanks!