Get OAuth providers
const options = {method: 'GET'};
fetch('http://localhost:8000/v1/auth/providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/auth/providers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url http://localhost:8000/v1/auth/providersimport requests
url = "http://localhost:8000/v1/auth/providers"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"emailPassword": true,
"github": true,
"google": true,
"cognito": true,
"microsoft": true,
"genericOAuth": [
{
"providerId": "<string>",
"name": "<string>"
}
]
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Providers
Get OAuth providers
Returns which OAuth authentication providers are enabled (GitHub, Google, Cognito, Microsoft) and whether email/password auth is available
GET
/
v1
/
auth
/
providers
Get OAuth providers
const options = {method: 'GET'};
fetch('http://localhost:8000/v1/auth/providers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8000/v1/auth/providers"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}curl --request GET \
--url http://localhost:8000/v1/auth/providersimport requests
url = "http://localhost:8000/v1/auth/providers"
response = requests.get(url)
print(response.text){
"success": true,
"data": {
"emailPassword": true,
"github": true,
"google": true,
"cognito": true,
"microsoft": true,
"genericOAuth": [
{
"providerId": "<string>",
"name": "<string>"
}
]
},
"meta": {
"requestId": "<string>",
"timestamp": "<string>"
}
}Was this page helpful?