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

For a custom auth integration with Dexie cloud, how does one initiate a login from a server after user info has been collected? #2060

Open
andersr opened this issue Aug 22, 2024 · 0 comments

Comments

@andersr
Copy link

andersr commented Aug 22, 2024

(I posted this in discussions, but reposting here, as I'm not clear what the correct place is to post questions.)

I am currently looking at adding a custom auth integration and reviewing the example provided in the docs.

Based on the example, it appears the only way to initiate a login flow in Dexie Cloud is from the client, by calling db.cloud.login({ email: "[email protected]"}) which then results in a call from dexie cloud to the endpoint added in fetchTokens in cloud.config.

However, based on the provided example, it appears that the server needs to respond immediately to this call with a token, which does not allow for completion of a custom login flow. (Eg an OTP roundtrip.)

It seems there needs to be a "/login" endpoint that is equivalent to calling db.cloud.login({ email: "[email protected]"}), but allows a server to do so after the needed info (eg their email) has been collected in a custom flow. Or am I not understanding how this should work?

Any clarifications would be appreciated!

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

1 participant