frontier icon indicating copy to clipboard operation
frontier copied to clipboard

Need a guidance to describe how to make a integrated authentication for my own app with frontier.

Open micli opened this issue 1 year ago • 1 comments

I saw frontier description on home page that frontier is a identity and access management tool. I thought that frontier can take responsibility of authentication in every REST API call/ web page access. How can may own app integrated frontier when REST API resquest contains bearer token? I checked documentation seems there is no specific article regarding this.

Thanks!

micli avatar Jul 28 '24 07:07 micli

You can authenticate in Frontier in multiple ways, starting with email-based OTP as the easiest. Mail configs needs to be set up for it to work.

Once configured, use /auth/register endpoint to specify email as a strategy and pass the required values. It will give you a state token and send an OTP to email. To start a session, provide this state and the OTP from email to /auth/callback endpoint. This will set the session cookies in your REST call starting the session. If the call is made from browser, the cookies will be persisted in browser and all subsequent calls to frontier will automatically send the cookies to authenticate the user.

kushsharma avatar Jul 29 '24 04:07 kushsharma