Difference between API and using a client library
I'd like to use FusionAuth for some of our applications. Could you please guide on which is recommended for authentication among HTTP API ( https://fusionauth.io/docs/v1/tech/apis/login/ ) and using a client library such as nodejs.
dan last edited by
Hi Arun! Welcome!
I'm not sure I understand your question.
Are you saying you are building an application where FusionAuth will issue JWTs after a user signs in, and those JWTs will be consumed by APIs?
Or are you building something else?
@dan In the documentation, it's mentioned that fusion auth exposes a few apis ([https://fusionauth.io/docs/v1/tech/apis/](link url)) . Can I directly call those APIs from front end or should I use an intermediate backend server such as express between my front end app and fusion auth.
How is this api different from the client libraries. In what context's should I use the API call and the client libraries
joshua last edited by joshua
Our APIs work with any language that supports RESTful calls. You could theoretically invent a coding language and as long as that language could interact with our API in a REST pattern, you would be able to integrate with FusionAuth.
The client libraries are helpful wrappers for RESTful API calls (among other things). They can make it quicker for you as a developer to integrate with FusionAuth as they have helpful methods and functionality built right in. You can find out more here:
For high-level architecture, there are many ways to use FusionAuth. To fully dive into them would probably be out of scope for a single forum post. I would recommend browsing our Authentication workflows. To point out gently, the reason why you would potentially use an Express Server, for instance, would be to hide your credentials from the Front End and better secure your application. While this document is on the longer side, it does offer a good introduction to one Authentication Workflow through OAuth (OAuth Grants in the OAuth Guide)
Finally, I would recommend metaphorically getting your feet wet with an example application to get a better understanding of FusionAuth and integration points. A great one with lots of helpful explainers is our Vue Tutorial or even, the node code found in our 5 min setup guide.
I hope this helps!
@arunkumar413 The client API libraries provide are just thin wrappers around the web API calls. They support mostly the same functionality but are just more convenient (rather than having to explicitly access a web endpoint from your code)