-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Auth set session manually #135
Auth set session manually #135
Conversation
js/authentication.md
Outdated
idToken: 'xxxxxxx', // Optional, the id token | ||
accessToken: 'xxxxxxx', // Optional, the access token | ||
refreshToken: 'xxxxxxx', // Optional, the refresh token | ||
expires_at: 1540857110755, // Required, the timestamp when the token expires |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you provide two tokens, which expires_at
is this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The format has been changed. The expires_at
would be the session expiration timestamp which is determined by the user.
js/authentication.md
Outdated
refreshToken: 'xxxxxxx', // Optional, the refresh token | ||
expires_at: 1540857110755, // Required, the timestamp when the token expires | ||
}, | ||
provider: AWSCognitoProvider.NAME, // Required, the name of the token provider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to make this provider generic for more than just Cognito
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWSCognitoProvider Does not exist?!
my aws-amplify: 1.1.17
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comments per our discussion on a new session concept. Let's integrate into the v2 design doc.
Any updates on this PR? We really need it. Not being able to user social login on react native is painful |
Also looking for an update on this, it would really help us out |
Any progress/updates on this PR? This would be a significant help in a problem we're currently dealing with in our app |
Any news on this? |
@DavidvanZyl @JohnBRTS @RyanRTS @svetozar02 we reviewed all of the feedback for this PR and related issues, and believe we can actually provide a more comprehensive solution. Could you please look at the following comment: aws-amplify/amplify-js#825 (comment) and related PR & RFC to see if this will meet your needs? If not could you let us know why you still might require this solution? Thanks. |
Looks like #2716 would do the job for me. My current issue is timing. I can get auth with the JS SDK and I could get caching etc with AppSync/Amplify if only I could get the two to work together. Or (more topically) get federated login in my Ionic/Angular app with the latter, rendering the prior unnecessary. @undefobj For my sanities sake please, as things stand, is it possible for me to make my own UI and have users log in anon and convert to authenticated with a social login and have the caching ability? |
@DavidvanZyl sounds like you're looking for something different than this PR, which is offline caching of data from AppSync and using it Authenticated and UnAuthenticated flows. Am I misinterpreting that? If that's the case I would suggest looking at this issue and the linked sample repo: aws-amplify/amplify-js#2363 (comment) |
@undefobj It's my understanding that an amplify api will automatically handle caching data from requests? But thats kind of beyond the point of this I guess (I just hoped you might have a solution and save me from this 'mare) The problem as I've seen it from my looking around and trying various solutions is that: While using amplify, federated login does not work. I have therefore, tried to make use of the SDK to provide Auth alongside Amplify but there seems to be no way to integrate the two. Which is what this PR is about so far as Ive understood it. I cant get the data returned by the SDK in terms of IdentityId and AccessId into Amplify Auth to create a session which leaves me with a 'No user' style of error. Ideally Amplify would let me use social logins, or at least let me create a session with data from the SDK so that I can use the api that amplify creates when you use the CLI (which again, I believe does caching). Does that make sense or am have I totally misunderstood something? |
If by caching in the API category you mean for offline support, etc., then yes this is provided by the AppSync SDK for the Apollo client which is part of the "umbrella" Amplify framework. Please see the documentation here: https://aws-amplify.github.io/docs/js/api#aws-appsync-sdk
I think there are a couple of things to tease out here. First, "Auth" is a category inside of Amplify which is comprised of libraries, CLI, toolchain, and UI components. What you are referencing above if the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems. |
No description provided.