Hi, Any recommendations on using social-auth in k...
# kvision
k
Hi, Any recommendations on using social-auth in kvision? For now I am looking for authenticating and using a few resources from FB GraphAPI. Thanks..
r
I haven't used any social auth with plain frontend applications. So I can't really recommend anything. But you probably just need to adapt and use Facebook JS API. There are typescript definitions available https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/facebook-js-sdk/index.d.ts, which you can convert with
dukat
to get Kotlin externals.
You can also try React Facebook Components https://www.npmjs.com/package/react-facebook with
kvision-react
module.
I've also found https://www.npmjs.com/package/universal-social-auth, which could be used for universal authentication, but you will probably need Facebook JS API as well to use fb resources.
a
The solution I have used is Keycloak. Keycloak is a OAuth2 provider on its own and has OIDC/SAML integration capabilities for a wide variety of SocialAuth services. In the end, you can use both "Login with FB" (as an example) and "Register/Login with email" with no additional code or effort. Keycloak has excellent integration with SpringSecurity for fine-grained control as well.
r
I've used Keycloak with Spring Boot KVision app as well, but it's server side integration of course.
I've used it to integrate with Kerberos/Windows AD authorization, didn't try any social auth providers though.
k
Thank you both.. As I am looking to integrate with frontend, I will try the react one first.