简体   繁体   English

使用AWS Cognito保持用户在ios中的登录状态

[英]Using AWS Cognito to keep a user in ios logged in

I have used AWS Lambda and amazon cogntio to authenticate users. 我已使用AWS Lambda和Amazon cogntio验证用户身份。

I used: 我用了:

getOpenIdTokenForDeveloperIdentity

and get a identity and token. 并获得身份和令牌。 Do I need to save bought locally in my app to keep a user logged in? 我是否需要将购买的本地商品保存到我的应用中以保持用户登录状态? How do I keep the user permanently logged in? 如何保持用户永久登录? Does the identity expire like the token? 身份是否像令牌一样过期? Can I get a new token without having the user login again? 我可以在没有用户再次登录的情况下获得新令牌吗?

I want to access various amazon services with the authenticated user. 我想通过身份验证的用户访问各种亚马逊服务。

The identity id itself does not expire. 身份标识本身不会过期。 If you pass the same key value pair "developer_provider_name": "developer_user_identifier" with getOpenIdTokenForDeveloperIdentity , the service returns the same identity id. 如果您通过getOpenIdTokenForDeveloperIdentity传递相同的键值对"developer_provider_name": "developer_user_identifier" ,则该服务将返回相同的标识ID。

The token expires in duration which was given to the service in the TokenDuration parameter, by default 15 minutes. 令牌的到期时间为TokenDuration参数中提供给服务的时间 ,默认为15分钟。 All you need to call the service again is developer_user_identifier and the user does not need to login again necessarily. 您需要再次调用该服务的全部就是developer_user_identifier ,并且用户不必再次登录。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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