Skip to content

Commit

Permalink
update readme.
Browse files Browse the repository at this point in the history
  • Loading branch information
sagishm committed May 30, 2024
1 parent c44703b commit ff4c088
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions GigyaSwift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,28 @@ gigya.sso(viewController: self, params: [“rp_context”: [“context_key”:
}
```

## Session Exchange Between Mobile & WebView
Applications (mobile/web) within the same site group are now able to share a session from the mobile application to a web page running the JS SDK.
Follow these steps to allow session exchange:

1. Use the “getAuthCode” interface. This call will provide you with the required code that the web page will require for the exchange.
```swift
gigya.getAuthCode() { res in
switch res {
case .success(let code):
//...
// Build url using code
case .failure(let loginApiError):
//...
print(loginApiError.error.localizedDescription)
}
}
```
2. Add these URL parameters to your hosted page/website URL using the provided code:
*** https://page-url?authCode=code&gig_actions=sso.login ***
3. Make sure that the WebView element you are using to open the URL has JavaScript enabled.
4. Once the page is loaded, the JS SDK will exchange the token provided for a valid session.

## FIDO/WebAuthn Authentication
FIDO is a passwordless authentication method that enables password-only logins to be replaced with secure and fast login experiences across websites and apps.
Our SDK provides an interface to register a passkey, login, and revoke passkeys created using Fido/Passkeys, backed by our WebAuthn service.
Expand Down

0 comments on commit ff4c088

Please sign in to comment.