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

Include installationId in Parse.User.become(SessionToken) #1629

Closed
REPTILEHAUS opened this issue Dec 7, 2022 · 7 comments
Closed

Include installationId in Parse.User.become(SessionToken) #1629

REPTILEHAUS opened this issue Dec 7, 2022 · 7 comments
Labels
type:question Support or code-level question

Comments

@REPTILEHAUS
Copy link

New Feature / Enhancement Checklist

Current Limitation

I created a 3rd party auth mechanism, I am using parse session returned from cloud code after user is validated to the client side which then auth's the user by using await Parse.User.become(user.getSessionToken())

Feature / Enhancement Description

The problem is that if the user logs in via another platform his session is killed and as we dont use Parse.User.login we cant make use of installationId which would mitigate this issue.

@parse-github-assistant
Copy link

Thanks for opening this issue!

  • ❌ Please edit your post and use the provided template when creating a new issue. This helps everyone to understand your post better and asks for essential information to quicker review the issue.

@REPTILEHAUS
Copy link
Author

REPTILEHAUS commented Dec 7, 2022

adding this other issue in here as it is kind of related to custom auth and maybe these 2 features would be complimentary

#1528

@mtrezza
Copy link
Member

mtrezza commented Dec 8, 2022

This doesn't seem to be neither a bug nor a feature request, as it merely states a problem with a custom auth process. To keep this issue open, we'd need a specific feature request that outlines the behavior you expect. Otherwise I'd suggest you open a discussion in the community forum to maybe come up with a more specific feature request statement.

@mtrezza mtrezza added the type:question Support or code-level question label Dec 8, 2022
@REPTILEHAUS
Copy link
Author

REPTILEHAUS commented Dec 8, 2022

@mtrezza i have a topic open on the community forum also which im hoping someone has a fix for my immediate needs without having to resort to implementing Parse.User.login()

The feature request is that Parse.User.become() could or should accept 2 parameters, because people can become a user in different contexts i.e in an app, a website or even via a cloud function so that they can have multiple sessions running rather than logging out of other active sessions:

My proposal is to somehow have this functionality.

Parse.User.become({ sessionToken,, InstanceID }) 

@mtrezza
Copy link
Member

mtrezza commented Dec 8, 2022

I'm trying to understand the underlying issue - do you mean that a user's existing sessions are deleted when a new session is created? And could you share the link to the forum discussion?

@REPTILEHAUS
Copy link
Author

REPTILEHAUS commented Dec 8, 2022

@mtrezza Yes exactly, Im building a lot of interconnected parse powered client apps, seems when we login on 1 and we try to use one of the other platforms the accounts are logged out, I was hoping we could use the following format for users Parse.User.become({ sessionToken,, InstanceID }) or for my use case specifically all the below are 1 user who can have many active sessions.

Parse.User.become({ "r:1BVXE3fss2...",, "app1" })
Parse.User.become({ "r:2222121211...",, "web" })
Parse.User.become({ "r:bhwhsk2122...",, "admin_portal" })
Parse.User.become({ "r:xx3asdasd3...",, "intranet" })

I provided pseudo code in the below on parse community, basically i have a custom auth mechanism with a custom build wordpress api that generates a JWT sends back to parse, validate it on parse and link the user get the session token and return to the client were we can "become" that token.

https://community.parseplatform.org/t/multiple-sessions-on-different-platforms/2963

@mtrezza
Copy link
Member

mtrezza commented Dec 8, 2022

Thanks, I'd say let's continue in the forum to keep the discussion in 1 place until we come up with a concrete change request.

@mtrezza mtrezza closed this as not planned Won't fix, can't repro, duplicate, stale Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:question Support or code-level question
Projects
None yet
Development

No branches or pull requests

2 participants