You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to authenticate in my app using amplify auth. It doesn't work for native devices. I am using a very specific setup using: vue, ionic, capacitor and aws-amplify. The authentication flow works when using this on my pc, but when trying it on a native device (ios) it doesn't authenticate me. It does tell me that the credentials are set from session, but that's it.
Expected behavior
I would've thought that amplify would authenticate me. It calls the token endpoint and then sets the credentials from the session. However this is not happening.
Reproduction steps
npm i
ionic cap sync ios <- Will compile the javascript code to swift code
ionic cap open ios <- Opens up Xcode
Run app on a simulator (I've tried mulitple devices, same result)
// Put your logs below this line
[log] - [DEBUG] 50:29.955 OAuth - Redirecting to https://my-app.eu-west-1.amazoncognito.com/oauth2/authorize?redirect_uri=myapp%3A%2F%2Flocalhost%2F&response_type=code&client_id=client_id&identity_provider=Freave&scope=phone%20email%20openid%20profile%20aws.cognito.signin.user.admin&state=state&code_challenge=codechallenge&code_challenge_method=S256
⚡️ [log] - [DEBUG] 50:29.956 AuthClass - Getting current session
⚡️ [log] - [DEBUG] 50:29.956 AuthClass - Failed to get user from user pool
⚡️ [log] - [DEBUG] 50:29.957 AuthClass - Failed to get the current user No current user
⚡️ [log] - [DEBUG] 50:33.48 Hub - Dispatching to auth with {"event":"parsingCallbackUrl","data":{"url":"myapp://localhost/?code=code&state=state"},"message":"The callback url is being parsed"}
⚡️ [log] - [DEBUG] 50:33.48 Hub - Dispatching to auth with {"event":"parsingCallbackUrl","data":{"url":"myapp://localhost/?code=code&state=state"},"message":"The callback url is being parsed"}
⚡️ [log] - parsingCallbackUrl
⚡️ [log] - [DEBUG] 50:33.49 OAuth - Starting code flow with myapp://localhost/?code=code&state=state
⚡️ [log] - [DEBUG] 50:33.50 Hub - Dispatching to auth with {"event":"codeFlow","data":{},"message":"Retrieving tokens from https://my-app.eu-west-1.amazoncognito.com/oauth2/token"}
⚡️ [log] - [DEBUG] 50:33.50 Hub - Dispatching to auth with {"event":"codeFlow","data":{},"message":"Retrieving tokens from https://my-app.eu-west-1.amazoncognito.com/oauth2/token"}
⚡️ [log] - codeFlow
⚡️ [log] - [DEBUG] 50:33.50 OAuth - Calling token endpoint: https://my-app.eu-west-1.amazoncognito.com/oauth2/token with {"grant_type":"authorization_code","code":"code","client_id":"client_id","redirect_uri":"myapp://localhost/","code_verifier":"code_verifier"}
⚡️ [log] - [DEBUG] 50:33.330 Credentials - set credentials from session
Before opening, please confirm:
JavaScript Framework
Vue
Amplify APIs
Authentication
Amplify Categories
auth
Environment information
Describe the bug
I'm trying to authenticate in my app using amplify auth. It doesn't work for native devices. I am using a very specific setup using: vue, ionic, capacitor and aws-amplify. The authentication flow works when using this on my pc, but when trying it on a native device (ios) it doesn't authenticate me. It does tell me that the credentials are set from session, but that's it.
Expected behavior
I would've thought that amplify would authenticate me. It calls the token endpoint and then sets the credentials from the session. However this is not happening.
Reproduction steps
npm i
ionic cap sync ios
<- Will compile the javascript code to swift codeionic cap open ios
<- Opens up XcodeCode Snippet
Log output
aws-exports.js
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: