- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Authentication API's
        Rachit Garg edited this page Jan 12, 2016 
        ·
        7 revisions
      
    - 
POST - http://localhost:3000/auth
Request Header should specify ContentType: Application/json
Body of the POST request should contain:
{ "email" : "[email protected]", "password" : "password-here", "password_confirmation" : "password-here", "optional_parameter" : "value", "config_name":"default", "confirm_success_url":"http:localhost:3000" } - 
POST - http://localhost:3000/auth/sign_in - If email is not confirmed
Request Header should specify ContentType: Application/json
Body of the POST request should contain:
{ "email" : "[email protected]", "password" : "password-here", }Response:
{ "success": false, "errors": : ["A confirmation email was sent to your account at [email protected]. You must follow the instructions in the email before your account can be activated"] } - 
POST - http://localhost:3000/auth/sign_in - After email confirmed
Request Header should specify ContentType: Application/json
Body of the POST request should contain:
{ "email" : "[email protected]", "password" : "password-here", }Response: The whole user object is returned.
{ "data": { "id": 1, "provider": "email", "uid": "[email protected]", "name": null, "nickname": null, "image": null, "email": "[email protected]", "address": null } }