From e05f5c023e5e1372feb5849832bbf86de8e2ee6b Mon Sep 17 00:00:00 2001 From: Tal Mirmelshtein Date: Tue, 13 Feb 2024 10:31:42 +0200 Subject: [PATCH] Update README.md (SSO) --- GigyaSwift/README.md | 59 ++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/GigyaSwift/README.md b/GigyaSwift/README.md index 9006c924..ae2966a9 100644 --- a/GigyaSwift/README.md +++ b/GigyaSwift/README.md @@ -442,40 +442,41 @@ If you experience problems and notice errCode -6 from WeChat while debugging, it Single Sign-On (SSO) is an authentication method that allows a user to log in to multiple applications that reside within the same site group using a single login credential. When using the mobile SSO feature, applications within the same group are able to share a valid session with the device browser. Requirements: -1. Mobile SSO requires iOS 13+. -2. You will be required to setup you central login page on your site’s console. +Note: Mobile SSO requires iOS 13+. -The SDK will use the following redirect schema structure: -**gsapi://app-bundle-id/login/** +Steps for implementing SSO: -Please make sure you add your unique URL to the **Trusted Site URLs** section of your parent site. +The SDK will use the following redirect schema structure: gsapi://app-bundle-id/login/. Please make sure you add your unique URL to the Trusted Site URLs section of your parent site. +To initiate the flow, use the SSO function provided by the Gigya shared interface: -Finally, to initiate the flow, use the SSO function provided by the Gigya shared interface. ```swift -Gigya.sharedInstance().sso(viewController: viewController) { result in - switch result { - case .success(data: let data): - print(data) - isLogged = true - case .failure(_): - break - } - } -``` -The available parameters map is a baseline for adding additional parameters to the initial authentication endpoint. Currently supported parameters: • “rp_context” - An available dynamic object which will be JSON serialized upon request. For more information. Usage example: +Gigya.sharedInstance().sso(viewController: viewController) { result in + switch result { + case .success(data: let data): + print(data) + isLogged = true + case .failure(_): + break + } + } +``` -``` -gigya.sso(viewController: self, params: [“rp_context”: [“context_key”: “context_value”]]) {[weak self] res in - switch res { - case .success(let data): - //... - print(data) - case .failure(let loginApiError): - //... - print(loginApiError.error.localizedDescription) - } - } -``` +The available parameters map is a baseline for adding additional parameters to the initial authentication endpoint. Currently supported parameters: + +• “rp_context” - An available dynamic object that will be JSON serialized upon request. For more information. Usage example: + +```swift +gigya.sso(viewController: self, params: [“rp_context”: [“context_key”: “context_value”]]) {[weak self] res in + switch res { + case .success(let data): + //... + print(data) + case .failure(let loginApiError): + //... + print(loginApiError.error.localizedDescription) + } + } +``` ## 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.