Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8085165
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T18:01:49+00:00 2026-06-05T18:01:49+00:00

I currently use Devise 2.1 + Rails 3.2.x to authenticate users. I’m also going

  • 0

I currently use Devise 2.1 + Rails 3.2.x to authenticate users. I’m also going to be adding OmniAuth-Facebook and Twitter support soon.

I wanted to use this existing infrastructure with Backbone.js. Can you let me know if this is the correct workflow from authentication perspective?

  1. User login via Devise (or OmniAuth)
  2. Use Devise’s Token Authenticatable to return a token?
  3. Backbone to access the token somehow and append that as part of API call? I don’t need the API to create user, that’s being handled by Devise.

Questions:
1. Is this how you’d implement it?
2. Any suggestions/code samples on #2 and #3?
3. How would you handle authorization with this? I don’t think CanCan will work.

P.S. I read through many articles, including this:
http://jessewolgamott.com/blog/2012/01/19/the-one-with-a-json-api-login-using-devise/.
They seem to be focused on authentication using the API, rather than securing the API resources after authentication is completed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T18:01:50+00:00Added an answer on June 5, 2026 at 6:01 pm

    I actually got this to even a little easier by:

    User logs in via Devise/OmniAuth, no authentication token needs to be created
    If I use the same action that is Devise enabled to serve up the REST API, it’ll automatically use the session info to authenticate, so no additional token capture/resend is needed.

    P.S. RABL is generate for creating API’s in Rails.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using omniauth-facebook gem with rails 3.2 and devise 2.0. I have a website
I currently use Devise for user registration/authentication in a Rails project. When a user
i'm currently buidling my own blog using rails 3. and use devise gem for
I use Devise in my Rails 3.1 application to manage sessions. In Safari and
My Rails 3 app is using Devise and I noticed that my users table
I'm currently trying to use Devise 1.1.pre3 as authentication in my upcoming project, but
I'm working on a Rails app where I use Devise for registrations. I use
I'm trying to create a Rails 3 app with an API. I use Devise
I use Devise in Rails 3. I want to see name of current_user in
I am using devise omniauth in my rails application, here is the User class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.