Upload to Amazon S3 and Calling Amazon Cognito Identity from Rails server

谁说我不能喝 提交于 2019-12-01 21:02:08

Cognito is only supported via the the v2 Ruby SDK.

Here is a minimal example for GetOpenIdTokenForDeveloperIdentity using the v2 SDK:

require 'aws-sdk'
cognito = Aws::CognitoIdentity::Client.new(region:'us-east-1')
resp = cognito.get_open_id_token_for_developer_identity(
           identity_pool_id: 'IDENTITY_POOL_ID', 
           logins: {'MY_PROVIDER_NAME' => 'USER_IDENTIFIER'})
  • IDENTITY_POOL_ID - The ID of your pool
  • MY_PROVIDER_NAME - The provider name you configured on your identity pool
  • USER_IDENTIFIER - The unique identifier for this user in your system

The response (when successful) will contain an identity_id and token for your user, which can be passed back to your mobile application.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!