OAuth Login
fixes #73
Looks good to me! 👍 However would this PR be better if it also included the frontend part so that the functionality can be tested completely before merging? Any thoughts @malithsen ?
@OshanIvantha @mpiplani thanks a lot! I'd definitely add the frontend as well, the only thing being that facebook and google have considerably changed their APIs and OAuth request permissions, which is making it even more tedious to set it up on the frontend. My original plan was to do precisely that, but then because of this, I figured I'd completely test the backend and get it merged, and then start working on the frontend. Thoughts?
@VibhorCodecianGupta This looks good, and thank you for the contribution :+1: Let's merge when it is ready to be usable by the end user. Integration with a single OAuth provider like Google will be good enough to get this merged
I'll put the frontend code too then, thanks!
@malithsen @OshanIvantha I was recently getting on this, then I realised that new users can only be created by a logged in admin. With this logic in place, social login is not of much use, reason being that no new user can login with social accounts until and unless the admin has created one. As for existing users, they can just connect their social accounts and probably login only after the admin has created a user. Every time one will attempt to login via social account, the code will try to create a new user (if not already existing) and that gets blocked until and unless admin authorises