简体   繁体   中英

AWS Cognito check and resume session (iOS)

I'm using Amazon Cognito with MobileHub on iOS. I've spent the whole day figuring out how to check and resume a session to make the login seamless.

I was able to sign in and sign up users but to make them open the app and the app checking the session (to see if they're not logged out/user was disabled from the user pool) and then if everything passes they're automatically logged in - this I can't figure out. The docs are not at all helpful and I've tried using resumeSession and other random methods but nothing is working.

The resume session should be called from your app delegate's didFinishLaunchingWithOptions method. Mobile Hub does this in the AWSMobileClient.swift file with callbacks from your app delegate. You can follow the getting started instructions on Mobile Hub console to integrate the AWSMobileClient.swift file. This file could be located in the AmazonAws folde of the sample app or minimal SDK which you download.

Thanks, Rohan

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM