Hallo guys,
I've started working on my first iPhone app, using the new language Swift, i must admit it is a great experience this far.
My background of programming have been mainly web for the past many years, thus i have some architectural questions i hope you can help me with.
The app is gonna use Facebook connect in order to register users, which is required in order to use the application; so whenever a user registers, i am gonna take whatever information i get from facebook and save it in my API. My Api will upon register return a access token, which the app will send along with further request. The expire date of this token will bump each time the user makes a request.
My questions..
What is the typical pattern of saving the user in app, when authenticated? In Rails ex. you would create a current_user method, which fetches the user data, and returns a user object. Basically i would like to have access to the current user globally, how would correctly achieve this?
If the users token expires, how would i go along with re authenticating the user? Will i use facebook connect again, and maybe to somethign as find by facebook id in my api?
Thank you.
I've started working on my first iPhone app, using the new language Swift, i must admit it is a great experience this far.
My background of programming have been mainly web for the past many years, thus i have some architectural questions i hope you can help me with.
The app is gonna use Facebook connect in order to register users, which is required in order to use the application; so whenever a user registers, i am gonna take whatever information i get from facebook and save it in my API. My Api will upon register return a access token, which the app will send along with further request. The expire date of this token will bump each time the user makes a request.
My questions..
What is the typical pattern of saving the user in app, when authenticated? In Rails ex. you would create a current_user method, which fetches the user data, and returns a user object. Basically i would like to have access to the current user globally, how would correctly achieve this?
If the users token expires, how would i go along with re authenticating the user? Will i use facebook connect again, and maybe to somethign as find by facebook id in my api?
Thank you.