We are looking to authenticate and map our users with an external web app. Would love any advice on the best way to approach the following:
When a user profile is create on our app (Backendless) we need to create a user on the external app using their API.
When a user logs into our app we need to authenticate that user on the external app using their API.
When a user logs out (or times out) of our app we need to log them out of the external app.
We are told the other API follows OAuth standards.
Is there a built-in or simple a way to achieve this flow cleanly with Backendless or does it require a rather a complicated amount of effort?
Thanks in advance for your thought & help.
Best, Kevin
Custom event handler after registration.
2.
Rewrite the login functionality with custom code. (Do your oAuth + login to backendless -> respond session/token.
3.
Custom event handler after logout.
Please keep in mind that if the same user is not created in Backendless, you would not be able to use any of the Backendless security features to restrict access to your data/files for users and the roles assigned to them.
Thanks Mark. The user would be created first in Backendless and then duplicated in the external app. With that in mind, what is it possible (best practice) using the builtin option in the user control panel of “Execute Registration Callback” and “External Authentication”? Or are those for another purpose other than to facilitate a SSO script?
We are trying to keep as much as possible within the Backendless functionality.
The “Registration Callback” and “External Authentication” will be going away. The best way is to do what Jens described earlier - implement it in custom business logic with event handlers.
Thanks Mark. Personally, having had no experience with OAuth, is this a trivial or rather complicated task when augmenting Backendless’ login functionality? Or is there anything specific I should be aware of in interacting with Backendless in this way? Would love an example if anyone has one, but of course, I’ll also start reading up on OAuth!