Skip auth app creation if there's one in localStorage

This commit is contained in:
Alex Gleason 2020-04-11 19:03:36 -05:00
parent 34bae6a5df
commit d4c84e2b4e
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -8,6 +8,8 @@ export const AUTH_LOGGED_OUT = 'AUTH_LOGGED_OUT';
export function createAuthApp() {
return (dispatch, getState) => {
const appToken = getState().getIn(['auth', 'app', 'access_token']);
if (appToken) return; // Skip for now, FIXME: call verify_credentials
return api(getState).post('/api/v1/apps', {
// TODO: Add commit hash to client_name
client_name: `SoapboxFE_${(new Date()).toISOString()}`,