in rails app, trying set cookie picked ember simple auth's cookie store after page has loaded. using ember simple auth oauth2 authorizer.
right now, planting oauth data directly cookie value:
{ "token_type": "bearer", "access_token": "3ec78864cc017982fdeeb0c092bfbea3f104df1e18c9c67f222581d9353f3fce", "refresh_token": "cb03c07b8845ea7b40251b0df46839177bd7b51b3dd1d23f167890b9e1549f07", "created_at": 1436454055, "expires_in": 7060, "expires_at": 1436461254 } i'm guessing isn't ember simple auth expects because syncdata function reads once , replaces value after next cookie poll:
{ secure: {} } what should data oauth 2? i'm guessing it's same no matter how it's stored (cookie vs. local storage vs. ephemeral storage).
after looking @ this screenshot this post, figure i'm way off, , i've been having trouble understanding poke around in ember simple auth source figure out.
ember simple auth uses cookie store internal state. cookie cannot set server , should not used on server side. library solely meant implementing token authentication stateless (= cookie-less) apis.
see readme more info how oauth 2.0 works esa: https://github.com/simplabs/ember-simple-auth/tree/master/packages/ember-simple-auth-oauth2#ember-simple-auth-oauth-20
Comments
Post a Comment