goth icon indicating copy to clipboard operation
goth copied to clipboard

How to use Goth With React Applications

Open PuneetPunamiya opened this issue 3 years ago • 5 comments

Currently goth does all the authentication on a single port. I have a use case where the user will click on a button on UI which is React Application saying Sign In With Github and other buttons with other provider name running on a different port. UI will send request to goth server and goth server should retun user details once authenticated

In short React Application running on port 3000 image

Once clicked on button request should be send to goth server running on a port say 4200, does all authentication process and once authenticated goth server returns user details back to React Application

PuneetPunamiya avatar Aug 03 '21 06:08 PuneetPunamiya

@bentranter Could you please take a look at this once ??

PuneetPunamiya avatar Aug 03 '21 06:08 PuneetPunamiya

https://www.loginradius.com/blog/async/google-authentication-with-golang-and-goth/

apoorvcodes avatar Oct 13 '21 04:10 apoorvcodes

this may help you

apoorvcodes avatar Oct 13 '21 04:10 apoorvcodes

@apoorvcodes thanks for this but this is still for a go web application right. My use case was separate ui application and a separate server which uses goth

PuneetPunamiya avatar Oct 13 '21 04:10 PuneetPunamiya

@PuneetPunamiya maybe you can try Casdoor: https://github.com/casbin/casdoor

Here's a forum program demo: https://forum.casbin.com/ , click the "Sign In" button and you will get something like:

image

hsluoyz avatar Nov 11 '21 17:11 hsluoyz