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

Management API - user creation with id specified #88

Closed
sergeantwolf opened this issue Nov 16, 2017 · 4 comments
Closed

Management API - user creation with id specified #88

sergeantwolf opened this issue Nov 16, 2017 · 4 comments

Comments

@sergeantwolf
Copy link

Hi,

In Auth0 management API, user creation call, there is a possibility to specify particular user_id.
I can't find a way do set it via the client here, since User class id field doesn't have a setter.

Any way to work around this besides implementing POST call by hand?

@lbalmaceda
Copy link
Contributor

@sergeantwolf I think this is new 🤔 . I could add a setter for the id in that case. I'll review with the team 👍 Q: Why would you want your own id instead of using the random hash that the db assigns?

@sergeantwolf
Copy link
Author

@lbalmaceda thanks for the quick answer!
It's pretty simple, I'm doing an ongoing sync of users from existing database. It's quite convenient to have a match in terms of ids for that purpose.

@lbalmaceda
Copy link
Contributor

I don't know if the user_id can be changed once set, probably not. Just remember that the ids will have a provider|id format, where provider is the connection provider i.e. facebook or auth0, and id is the value you pass to this post as user_id.

@sergeantwolf
Copy link
Author

Yeah, you can't change the userId value for existing user. Which makes perfect sense imo :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants