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

  • Home
  • SEARCH
  • 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 4000464
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T07:47:05+00:00 2026-05-20T07:47:05+00:00

I have implemented web service using rails server. The server uses rails default authentication

  • 0

I have implemented web service using rails server.
The server uses rails default authentication scheme for user login.

Now, I am developing native mobile app for the service and the app is communicating with server using json requests and responses.

Since the native mobile app is safari based, the authentication works fine as session id can be set into cookie but I am concerned that it is under the risk of CSRF attack since rails does only deal with such attacks for html request using CSRF token.

My questions are followings:
– Do you know any way of working around this?
– Should I implement different controllers for mobile app since it is more like closed (private) API? If so what is the standard way of doing authentication?

Many Thanks

  • 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-05-20T07:47:06+00:00Added an answer on May 20, 2026 at 7:47 am

    Basic HTTP authentication over HTTPS should do the trick.

    Client code executes json API requests as normal and sets the Authentication header with the basic credentials (assuming client app has logged in, and has access to username/password).

    This is essentially plaintext, but will be safe from eavesdropping if transmitted using HTTPS.

    Rails has some built in helpers for checking username/password.

    Alternatively, 2-legged OAuth could do the trick as well, but is more complicated to implement.

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

Sidebar

Related Questions

I have Restful web-service implemented using Apache CXF. Since I am going to use
I have implemented a generic handler to work as a restful web service in
I have created a program in visual c++, where i have implemented a web
I am running Ruby on Rails 3 and I have an application that makes
I have implemented an autocomplete / instant search on a mobile application that I
I am trying to use Spring Security 3.0.5 in my web application. Basically, I
I am building an application that has a web front end and a desktop
I need some help figuring out the best way to proceed with creating a
I am due to make an android application which sends and recieves data from
I am working with a financial application and am looking for the best solution

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.