Account by username
Is it possible to get an account using the username only, rather than the id?
No, currently the GET endpoint only finds by ID
No, currently the GET endpoint only finds by ID
Is it possible for this to be added as a feature? I could try making a PR for it if I find the time.
At the moment, when we create an auth account, we run a query to store the account id and username on our end, to get the account with later. Somehow the latter query fails sometimes, which essentially locks us out of getting the auth account, since we can't link the username to the account id, and therefore can't get the auth account. If I'm missing some feature or way, I'd appreciate a correction. (we've set the signup endpoint to private so it only functions on the backend)
Yes, I think this is possible and would be happy to look at a PR. Perhaps the existing GET endpoint could search both fields in sequence?
It sounds like you're dealing with a two-phase commit problem where your client POSTS an AuthN account but then fails to POST that information to your application. If the user tries to sign up again, they'll get an "already taken" error from AuthN. Is that right?
This can be challenging. One approach you might consider is turning the sign-up process into two steps, where the first step is a find-or-create action to AuthN and the second step collects any additional information you need to save a user profile in your application. This is similar to an OAuth flow, where authentication happens elsewhere and your application must have a separate process for gathering profile information.