The entire server API specification is available through a web interface and as a Swagger JSON. You can use the Swagger web interface for manual testing of the API on the hosted authentication server. Do not forget to enter the Apikey first through the Authorize button.
We recommend using an automatically generated library to integrate the nextAuth REST SDK into your application, instead of manually implementing the REST calls as described in the Swagger documentation.
We provide prepackaged SDK code for the following languages:
- TypeScript Angular
- TypeScript AngularJS
- TypeScript Fetch
- TypeScript jQuery
- TypeScript Node
Since the nextAuth SDK is entirely based on Swagger, you can easily generate an SDK for any language supported by Swagger Codegen.
First, download the Swagger Codegen CLI.
curl -LO https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.5/swagger-codegen-cli-2.4.5.jar
Next, get the nextAuth Swagger specification.
curl -LO https://api.doc.nextauth.com/api/swagger.yaml
Finally, generate your SDK!
java -jar swagger-codegen-cli-2.4.5.jar generate -l erlang -i swagger.yaml -o nextauth-client-erlang
In this example, we create an Erlang SDK. Check the Swagger Codegen documentation for supported languages and options.