pleroma/app/soapbox/utils/auth.js
2021-03-25 12:25:45 -05:00

8 lines
242 B
JavaScript

export const isLoggedIn = getState => {
return typeof getState().get('me') === 'string';
};
export const getAccessToken = state => {
const me = state.getIn(['auth', 'me']);
return state.getIn(['auth', 'users', me, 'access_token']);
};