angularjs - Renew a Long-Lived token used at server side with an Angular application and FB SDK -
my context: angularjs application using javascript facebook sdk, , distinct server (rest apis).
workflow:
user logged in client through fb sdk using method fb.login(callback)
.
later gives short-lived token sent server in order transform long-lived token.
i'm interested in mechanism of refreshing long-lived token after 60 days.
so, reading doc, found this:
even long-lived access token expire. @ point, you can generate new long-lived token sending person login flow used web app - note person not need login again, have authorized app, redirect app login flow refreshed token - how appears person vary based on type of login flow using, example if using javascript sdk, take place in background, if using server-side flow, browser redirect login dialog , automatically , app again.
if interpret well, when user logged in through fb.login(callback)
, simple redirect angular application's login flow allow new short-lived token.
imagine fb.login
run anew in case, without user interaction, written.
i want test simply, i've done is:
- logged in application through
fb.login(callback)
. - clicked on dummy link making simple redirect with:
window.location.replace('/');
my application being single page application, every url should considered authentication page.
but fb.login
isn't run in background, expected doc.
what reason?
work when domain making redirect distinct client? (i can't test case right now)
did misinterpret doc?
Comments
Post a Comment