Skip to content
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

[Feature Request] Add "setSignInUserSession" function #1486

Open
fpabl0 opened this issue Sep 6, 2021 · 8 comments
Open

[Feature Request] Add "setSignInUserSession" function #1486

fpabl0 opened this issue Sep 6, 2021 · 8 comments
Labels
auth Related to the Auth category/plugins feature-request Request a new feature

Comments

@fpabl0
Copy link

fpabl0 commented Sep 6, 2021

Hello, in amplify-js there is a setSignInUserSession function that allow us to set session tokens without using the signIn function, is it possible to have this feature in Android too? Thanks.

Related to aws-amplify/amplify-flutter#845.

@rjuliano rjuliano added auth Related to the Auth category/plugins feature-request Request a new feature labels Sep 7, 2021
@raphkim
Copy link
Contributor

raphkim commented Sep 9, 2021

We will track this feature request in the backlog for native platforms (iOS + Android). We will prioritize it based on how much traction it receives.

@uyt95
Copy link

uyt95 commented Mar 3, 2022

Has there been any progress on this feature? We are developing an Android TV application with a similar use case as the Flutter app of fpabl0.

@gpanshu
Copy link
Contributor

gpanshu commented Nov 18, 2022

Hi @fpabl0 can you elaborate what your use case is and how you would achieve that without sign in? From what I understand you will need to sign in using either escape hatch or your own apis and then store the session parameters in amplify. This is not possible to do since we are now using a state machine architecture and all other apis depend on the sign in state machine to be in the signed in state. Is there a reason you are looking for authentication outside of the SDK?

@gpanshu gpanshu added the pending-community-response Issue is pending response from the issue requestor label Nov 18, 2022
@gpanshu
Copy link
Contributor

gpanshu commented Dec 29, 2022

Closing due to inactivity.

@gpanshu gpanshu closed this as completed Dec 29, 2022
@github-actions
Copy link
Contributor

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

@flodaniel
Copy link

Hi @gpanshu ,
I am jumping in as @fpabl0 is not responding and we are also interested to have this implemented.
In our project we initially started without using amplify and handling user authentication through our own backend. So credentials would be passed from our (flutter) app to our backend and from there we used the amazon-cognito-identity-js package to handle authentication.

As we expanded our team and moved from the MVP phase to an actual producted we started using amplify. Because we cannot migrate the existing/logged in users to the frontend amplify SDK, we pretty much only use the provided escape hatches and do tons of manual REST requests to the AWS infrastructure (e.g. for storage).
If we could "silently" sign in our already authenticated users we could fully migrate to the amplify SDK.

I hope this explains the reasoning behind this feature request, but I am happy to explain in more detail if necessary.

@gpanshu
Copy link
Contributor

gpanshu commented Jan 5, 2023

Hi @flodaniel feel free to create a PR contribution to our repository and we would evaluate its pros and cons to have such a feature available. In the meantime I am going to re-open this issue and track it as a feature request. Thank you.

@gpanshu gpanshu reopened this Jan 5, 2023
@gpanshu gpanshu self-assigned this Jan 5, 2023
@gpanshu gpanshu removed the pending-community-response Issue is pending response from the issue requestor label Feb 3, 2023
@gpanshu gpanshu removed their assignment Oct 13, 2023
@pm-nchain
Copy link

Based on my weird usecase, setting session manually could be useful. I don't know the specifics, but we had to do some work around in order for WeChat login to work for us.

We POST WeChat login code to our BE, and they create user account on Cognito side, and return user data (token, refreshToken, idToken, etc.). And I had to use that data, to manage user session.

I guess our BE could make this easier for me, but that's the hole I'm in 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth Related to the Auth category/plugins feature-request Request a new feature
Projects
None yet
Development

No branches or pull requests

7 participants