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 6255265
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:20:04+00:00 2026-05-24T14:20:04+00:00

I would like to start working on an idea I have for an iphone

  • 0

I would like to start working on an idea I have for an iphone app, but I am having some issues on where to begin. I would like the app to be mostly used on the iphone but have some functionality on the web app such as logging in and viewing things created from the iphone app. I have started a rails3 app and would like to use this as my backend for the api/app.

I am confused as to how I should go about with an authentication system so that this app can work both as a web app and an api for an iphone app.

I want to use omniauth for the login on the web and iphone app because I only want users to login with twitter and/or fb, but I don’t know how to authenticate requests once the users is logged into the iPhone app. I know some other gems like devise allow for things like a api key authenticatable column that makes signing api calls easier, but I think its way too bloated of a auth system to use.

Can anyone give me advice on how to go about making an authentication system that will work both as a webapp and when authenticating over an api with an iphone.

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-24T14:20:05+00:00Added an answer on May 24, 2026 at 2:20 pm

    A few thoughts…

    I would assume to just have the iOS app act similar to a web browser and send a persistent cookie along with each request like normal. This way, you can use standard authentication practices and also leave yourself open to releasing a web-based version of your app one day without having to overhaul everything.

    So the workflow would be:

    • Get authentication information from user input and save securely in the Keychain to seamlessly log them in every time they open the app
    • Use something like Devise to do the Rails server-side authentication (i.e. don’t reinvent the wheel)
    • POST the data to the server to create a new session
    • Receive the session information back from the server in the form of a cookie
    • Store the cookie in the iOS app
    • Send the cookie information back to the server with every request
    • If they log out, destroy the cookie and the keychain data you stored to create the cookie every time they opened the app

    NSURLConnection provides a means to do much of this, and even sends any stored cookies along with the requests as long as you don’t tell it not to. Here’s an old SO post talking about some of this: Objective-C Asynchronous Web Request with Cookies

    A few resources to help you along the way:

    1. Getting / storing / sending cookies: http://www.calaresu.eu/2011/06/01/using-cookies-with-cocoa-nshttpcookie/
    2. Good slideshow about iPhone with Rails: http://www.slideshare.net/maximeguilbot/rails-as-ios-application-backend
    3. Good for storing auth info in the Keychain on iOS: https://github.com/ldandersen/scifihifi-iphone
    4. Talking with the Rails app: http://restkit.org/ (and here’s a rails example)

    Hope that helps some!

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

Sidebar

Related Questions

I have a project that I would like to start beta testing soon, it
I have wrist pain when I type and I would like to start writing
I'm currently working on an iPhone app and I have a library from a
I am having a problem producing a working jar file. I would like to
I would like to start tagging my deployed binaries with the latest SVN revision
I would like to start learning ASP.NET on a for-fun project. I'm hoping to
I would like to start learning SQL Server 2005 on my own. Can anyone
I use the on-demand (hosted) version of FogBugz. I would like to start using
I'm stuck on a PHP 4 server, and I would like to start moving
I would like to create/start a simulator for the following microcontroller board: http://www.sparkfun.com/commerce/product_info.php?products_id=707# The

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.