You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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!
The text was updated successfully, but these errors were encountered:
sorry for late reply. Even if the fetchTokens callback expects a Promise of a TokenResponse in return, there's nothing requiring this to be returned immediately. You can implement any custom flow of multiple requests/responses between your client and server before returning a result. You could even redirect the user away from your app to a 3rd part login flow using oidconnect or similar (in that case there won't be any TokenResponse returned but it doesn't matter because the login flow would reddirect you back to your app when completed and att that time, you'd have a local endpoint that will have login information immediately this time.
(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 infetchTokens
incloud.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!
The text was updated successfully, but these errors were encountered: