thoughtbot / ios-on-rails

A guide to building a Rails API and iOS app
Other
76 stars 6 forks source link

Send device token in header #83

Closed jessieay closed 10 years ago

jessieay commented 10 years ago

https://trello.com/c/1PHmw5Pg

jessieay commented 10 years ago

Would love a review when you have time! @r00k and any other Learn peeps!

jessieay commented 10 years ago

This PR is done but I won't merge it in until @dazmuda changes the iOS code to look for the same header token. Diana, can you do that? The header key is Authorization and the value is tb-device-token TOKEN

Ping me back here when you're done so I can merge. Until then, will work on adding info about this token in header stuff to the book text and creating a PR for that.

malandrina commented 10 years ago

@jessieay I had a question about the "sad path" when a user is not found for the device token that's passed up, but otherwise looks good.

dazmuda commented 10 years ago

Quick question: On POST /users, I'm sending tb-device-token and tb-app-secret in the header. Am I receiving the user's ID and device token back? If not, could I receive those back?

jessieay commented 10 years ago

You want both of those back? The response body, or elsewhere?

dazmuda commented 10 years ago

Response body, please. Events that I get back have the owner's ID, not their device-token (correct?) So I need the current user's ID to see if they own an event.

jessieay commented 10 years ago

@dazmuda Opened a PR to return to device toke and id in POST users here: https://github.com/thoughtbot/ios-on-rails/pull/85/

jessieay commented 10 years ago

Merged at c93bd202672b726203dcb9137a711682e4f0bf93