Skip auth app creation if there's one in localStorage
This commit is contained in:
parent
34bae6a5df
commit
d4c84e2b4e
1 changed files with 2 additions and 0 deletions
|
@ -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()}`,
|
||||
|
|
Loading…
Reference in a new issue