Note that there are some explanatory texts on larger screens.

plurals
  1. POShared Facebook Access Token between Website and Mobile Application
    primarykey
    data
    text
    <p>I would like a Web site (Rails 3.1 with Devise and Omniauth) and a mobile application (iOS5) to share authentication. By this I mean I would like a user to be able to SSI to the site with Facebook, or SSI to the mobile application and have the mobile application talk to the website's API using the user's credentials to authenticate to the website. </p> <p>I currently have the web side working nicely with a User being able to SSI to an account. I also have the mobile application working, supporting user SSI. Both are using the same Facebook application. </p> <p>My problem is finding something shared between the two that I can use for the Mobile application to authenticate against the site. Obviously both have access to the same user ID, but this doesn't seem very secure. My mobile application has an Access Token, but this differs from the website's access token, though they look similar, and my mobile access token expires while my web access token does not.</p> <p>Web/Rails Token (Not real):</p> <blockquote> <p>DDDAKnu1dg40BDHEWN0VDssxs8GGF8ZBEEOb38HnS0IUEQC1NSufmPCcGeFkTuw39ZDl7OhlZBD2jwJEqXdAZCtZBflJRQKZB4ZA</p> </blockquote> <p>Mobile/iOS Token (Not real)</p> <blockquote> <p>BDDAKnu1dg40BDEo3YjZD2hIwjfZB4slXJj3fmHfzLh5q1xZD0ShfJCb6PMjnApkpM0FTuGGvWnzZBQy4GZCMuysEEqhMz8YgruD53TXKTZC0GPFkfVe0b6fe8wieLLOZDDZA</p> </blockquote> <p>Using Facebook's <a href="https://developers.facebook.com/tools/debug/access_tokentoken?q=BAADKnu7dg40BAEo3YjZA2hIxjfZB4slXJj3fmHfzLh5q7wZA0ShfJCb6PMjnDpkpM0FTuGGvWnzZBQy4GZCMuysEEqhMz8YgruA53TXKTZC0GPFkfVe0b6fe8xieLLOZAAZD">access token debugger</a> I get the following (Everything removed is identical between tokens):</p> <p>For Web/Rails Token:</p> <pre><code>App ID: XXXXXXXXXXXXXXXX : SomeAppName User ID: XXXXXXXX : My Name Issued: 1327507734 : 8:08 am Jan 25 2012 Expires: Never Valid: True Origin: Web Scopes: email offline_access </code></pre> <p>For Mobile/iOS:</p> <pre><code>App ID: XXXXXXXXXXXXXXXX : SomeAppName Metadata: {"sso":"iphone-safari"} User ID: XXXXXXXX : My Name Issued: 1327507734 : 8:08 am Jan 25 2012 Expires: Never Valid: True Origin: Native Mobile Scopes: email offline_access </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload