ios - Refresh the oauth linkedin token -


i'm working on ios app uses login via linkedin. i'm using web view user login , getting token linkedin. if understand correct, token received valid short period , hence need make call linkedin existing token new token extended period. can please let me know api should call refresh token new token extended validity?

i'm using https://github.com/jeyben/ioslinkedinapi

according linkedin there no direct api call refresh oauth 2 token. what's supposed happen if:

  1. the user logged linkedin
  2. they have current (less 60 days old) token

pointing them authentication url trigger refresh of token, without needing user log in.

in using ioslinkedinapi library, didn't seem case.

what figured out was, authentication flow wasn't generating login session cookie linkedin in ios simulator or on device, requirement 1 never being met.

you need have user login through regular linkedin login page, , gets session cookie, can cache. after send user authenticate app, can load cached cookie nshttpcookiestorage sharedhttpcookiestorage each time want call authentication url refresh user's token.

i created helper class example if want check out: ioslinkedintokenauthorizer


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

django - CSRF verification failed. Request aborted. CSRF cookie not set -