pleroma/app/soapbox/utils/auth.js

9 lines
242 B
JavaScript
Raw Normal View History

2021-03-25 10:25:45 -07:00
export const isLoggedIn = getState => {
return typeof getState().get('me') === 'string';
};
2021-03-24 15:53:09 -07:00
export const getAccessToken = state => {
const me = state.getIn(['auth', 'me']);
return state.getIn(['auth', 'users', me, 'access_token']);
};