Crema React
v-3
v-3
  • About Crema
  • Crema 4.x (Next version)
  • Overview
    • Crema Overview
    • Folder Structure
      • @crema
      • page
      • redux
      • shared
      • types
    • GitHub Access
    • Slack Community
    • Figma File
  • Development
    • Installation
      • Pre-Requisites
      • Installing Crema
    • Route Overview
    • Add New Route
    • Auth User
    • Authentication Methods
    • API Calls
    • Multilingual
      • Adding New Language
      • Changing Language
    • Style Framework
  • MUI
    • Theme Color
    • Sidebar Configuration
      • Adding New Menu
      • Menu Color Theme
    • Navigation Style
    • Footer Configuration
      • Footer
      • Footer Type
    • Template Mode
    • Template Direction
  • Next-Js
    • About Next.JS
    • Folder Structure
    • Installing Next jS
    • Authentication
    • Add New Route
    • Deploy to server
  • FAQ
  • React Bootstrap
    • About React-Bootstrap
    • Styled Framework
    • RTL
    • Dark Theme
  • ANT Design
    • About Crema Ant
    • Style Framework
  • Servers
    • Python
    • Laravel
    • Mongoose
  • Credits
  • Crema V-2
Powered by GitBook
On this page
  • Register User
  • Login User
  • Auth User

Was this helpful?

  1. Servers

Python

Crema has some auth inbuilt APIs. Demo APIs listed here -

Last updated 2 years ago

Was this helpful?

You can find out the Python auth APIs public repo

All Auth APIs listed here -

Register User

POST https://your-domain.com/api/users

This endpoint allows you to get free cakes.

Request Body

Name
Type
Description

name

string

Name of the user

email

string

Email of the user

password

string

Password for the account

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1Nzc5MTIsIm5iZiI6MTYwMDU3NzkxMiwianRpIjoiNzg0OWQyOWMtZjlkNC00ZDRlLWEwMjAtMjkzMTcxNzE5MmVkIiwiZXhwIjoxNjAwNTc4ODEyLCJpZGVudGl0eSI6MSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.Cx76YDyMWVVCb2gQPhQ4JejeQjY8_gbD2RTOZv4ZDHI",
    "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1Nzc5MTIsIm5iZiI6MTYwMDU3NzkxMiwianRpIjoiYWY4NTQ4NWMtZTUwZi00NWJkLWJkNTEtYzJjNTg3MDAzMGUwIiwiZXhwIjoxNjAzMTY5OTEyLCJpZGVudGl0eSI6MSwidHlwZSI6InJlZnJlc2gifQ.XXLZ7tAYuZDqfYvWZ9pX4EdNbQLfnlEclXWMaewOD3U"
}
{
    "error": "A user with that email already exists."
}

Login User

POST https://your-domain.com/api/auth

Request Body

Name
Type
Description

email

string

Email of the user

password

string

Password of the account

{
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1NzgwNDksIm5iZiI6MTYwMDU3ODA0OSwianRpIjoiYjIxNDNkMjUtOWI3Yi00Y2FlLThmN2YtY2YxZDQyNzVhMTUwIiwiZXhwIjoxNjAwNTc4OTQ5LCJpZGVudGl0eSI6MSwiZnJlc2giOnRydWUsInR5cGUiOiJhY2Nlc3MifQ.IWnfR_2UFSJtzWHqzTG5o7PnHd3H6cQc13bnwe8cPPU",
    "refresh_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDA1NzgwNDksIm5iZiI6MTYwMDU3ODA0OSwianRpIjoiOThmNzQzZDMtN2M2Mi00ODFjLThjOWItMjI3NTQyZDljNTg3IiwiZXhwIjoxNjAzMTcwMDQ5LCJpZGVudGl0eSI6MSwidHlwZSI6InJlZnJlc2gifQ.g8UV9xSxHzc3XxgIzY0CTm2_2RTjTY2bn484gFdsW0E"
}
{
    "error": "Invalid credentials!"
}

Auth User

GET https://your-domain.com/api/auth

Headers

Name
Type
Description

Authorization

string

Bearer token

{
    "created_on": "2020-09-20T04:58:32",
    "id": 1,
    "email": "jose@gail.com",
    "email_verified_at": null,
    "updated_on": "2020-09-20T04:58:32",
    "name": "jose"
}
here