Example using React and Go? #4276
-
A bit new to using an IAM tool and hence was wondering the right approach to go forward with if I want to integrated Authgear in my apps using React(Custom UI maybe?) and Golang(Fiber). |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Anan7Codes , Thanks for your message. You can integrate Authgear into your React app using our SDK. In the frontend, trigger the user authentication and exchange for tokens with the functions provided by the SDK. Then your app can access restricted resources in your Golang backend server by including the access token. The access token proves the requests are sent from an authenticated user.
In the Golang server, you can verify if the user's requests by validating the access token, which is a JWT. After validating the JWT and decoding the user, your server can respond to the request based on the authentication status of the user. It's recommended for developers to start with the default AuthUI for the signup/login screens, as it's easy to integrate and all authentication methods are supported built-in. Once you integrated Authgear on the frontend and backend, and can authenticate the users, you can look into implementing your own custom UI. Hope it helps, looking forward to your reply. |
Beta Was this translation helpful? Give feedback.
Hi @Anan7Codes , Thanks for your message.
You can integrate Authgear into your React app using our SDK. In the frontend, trigger the user authentication and exchange for tokens with the functions provided by the SDK. Then your app can access restricted resources in your Golang backend server by including the access token. The access token proves the requests are sent from an authenticated user.
In the Golang server, you can verify if the user's requests by validating the access token, which is a JWT.
You can see …