AWS cognito documentation change
Summary
Removed Xamarin platform integration examples for Login with Amazon
Security assessment
Removal of Xamarin code samples appears to be platform support deprecation rather than security-related. No evidence of security vulnerability addressed in the removed content.
Diff
diff --git a/cognito/latest/developerguide/amazon.md b/cognito/latest/developerguide/amazon.md index 3ba04c8c3..97e624af2 100644 --- a//cognito/latest/developerguide/amazon.md +++ b//cognito/latest/developerguide/amazon.md @@ -5 +5 @@ -Setting up Login with AmazonConfigure the external provider in the Amazon Cognito consoleUse Login with Amazon: AndroidUse Login with Amazon: iOS - Objective-CUse Login with Amazon: iOS - SwiftUse Login with Amazon: JavaScriptUse Login with Amazon: Xamarin +Setting up Login with AmazonConfigure the external provider in the Amazon Cognito consoleUse Login with Amazon: AndroidUse Login with Amazon: iOS - Objective-CUse Login with Amazon: iOS - SwiftUse Login with Amazon: JavaScript @@ -121,73 +120,0 @@ After the user authenticates with Login with Amazon and is redirected back to yo -## Use Login with Amazon: Xamarin - -**Xamarin for Android** - - - AmazonAuthorizationManager manager = new AmazonAuthorizationManager(this, Bundle.Empty); - - var tokenListener = new APIListener { - Success = response => { - // Get the auth token - var token = response.GetString(AuthzConstants.BUNDLE_KEY.Token.Val); - credentials.AddLogin("www.amazon.com", token); - } - }; - - // Try and get existing login - manager.GetToken(new[] { - "profile" - }, tokenListener); - - -**Xamarin for iOS** - -In `AppDelegate.cs`, insert the following: - - - public override bool OpenUrl (UIApplication application, NSUrl url, string sourceApplication, NSObject annotation) - { - // Pass on the url to the SDK to parse authorization code from the url - bool isValidRedirectSignInURL = AIMobileLib.HandleOpenUrl (url, sourceApplication); - if(!isValidRedirectSignInURL) - return false; - - // App may also want to handle url - return true; - } - - -Then, in `ViewController.cs`, do the following: - - - public override void ViewDidLoad () - { - base.LoadView (); - - // Here we create the Amazon Login Button - btnLogin = UIButton.FromType (UIButtonType.RoundedRect); - btnLogin.Frame = new RectangleF (55, 206, 209, 48); - btnLogin.SetTitle ("Login using Amazon", UIControlState.Normal); - btnLogin.TouchUpInside += (sender, e) => { - AIMobileLib.AuthorizeUser (new [] { "profile"}, new AMZNAuthorizationDelegate ()); - }; - View.AddSubview (btnLogin); - } - - // Class that handles Authentication Success/Failure - public class AMZNAuthorizationDelegate : AIAuthenticationDelegate - { - public override void RequestDidSucceed(ApiResult apiResult) - { - // Your code after the user authorizes application for requested scopes - var token = apiResult["access_token"]; - credentials.AddLogin("www.amazon.com",token); - } - - public override void RequestDidFail(ApiError errorResponse) - { - // Your code when the authorization fails - InvokeOnMainThread(() => new UIAlertView("User Authorization Failed", errorResponse.Error.Message, null, "Ok", null).Show()); - } - } - -