Test the API Endpoints
You should now be able to test your API authentication endpoints:
Sign Up (POST /users):
Body: { "user": { "email": "test@example.com", "password": "password" } }
Log In (POST /users/sign_in):
Body: { "user": { "email": "test@example.com", "password": "password" } }
On success, you’ll receive a JWT token.
Log Out (DELETE /users/sign_out)
Notes
xtrack/api on main via 💎 v3.3.4
❯ rails generate devise:install
create config/initializers/devise.rb
create config/locales/devise.en.yml
===============================================================================
Depending on your application's configuration some manual setup may be required:
1. Ensure you have defined default url options in your environments files. Here
is an example of default_url_options appropriate for a development environment
in config/environments/development.rb:
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }
In production, :host should be set to the actual host of your application.
* Required for all applications. *
332
TODO
Manual test
Test the API Endpoints You should now be able to test your API authentication endpoints:
Sign Up (POST /users): Body: { "user": { "email": "test@example.com", "password": "password" } } Log In (POST /users/sign_in): Body: { "user": { "email": "test@example.com", "password": "password" } } On success, you’ll receive a JWT token. Log Out (DELETE /users/sign_out)
Notes