Skip to content

simple implementation with token auth, helpful for getting an API off the ground

Notifications You must be signed in to change notification settings

dylandechant/devise-with-token-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This shows basic authentication via devise with a json api.

Following section shows basic user auth using the api. As of right now there is no support for token revocation or token expiration.

CREATE USER

STATUS 201 CREATED from POST [domain]/users

data:

"user": {
  "email": "[email protected]",
  "password": "nachooooescheese"
}

sample response:

{
    "user": {
        "email": "[email protected]",
        "authentication_token": "GhBPRwKabKQX2wLzwU56"
    }
}

USER SIGN IN

STATUS 200 OK from POST [domain]/users/sign_in

data:

{
  "user": {
    "email": "[email protected]",
    "password": "nachooooescheese"
  }
}

sample response:

{
    "user": {
        "email": "[email protected]",
        "authentication_token": "GhBPRwKabKQX2wLzwU56"
    }
}

About

simple implementation with token auth, helpful for getting an API off the ground

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published