ducky/web

Paddy 2015-06-30 Parent:99a43a6d1d30 Child:791aec3eb17b

11:3bdc03963abe Go to Latest

ducky/web/src/models/profile.js

Implement OAuth token refreshing helper. Create an ampersand-sync/XHR request wrapper that will detect when a request fails because an OAuth2 token has expired, and will try to refresh the token then retry the request.

History
paddy@0 1 import Model from 'ampersand-model'
paddy@0 2
paddy@0 3 export default Model.extend({
paddy@0 4 props: {
paddy@0 5 'id': 'string',
paddy@0 6 'name': 'string',
paddy@0 7 'created': 'date',
paddy@0 8 'last_seen': 'date',
paddy@0 9 },
paddy@0 10 })