mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
reset the ApiToken on password changes/resets (#15433)
* reset the ApiToken on password changes/resets * fix/add tests * fix(typo): test grammar * update new API Token Strings, removed unused one --------- Co-authored-by: Kalista Payne <sabrecat@gmail.com>
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import { LOCALSTORAGE_AUTH_KEY } from '@/libs/auth';
|
||||
|
||||
// @TODO: I have abstracted this in another PR. Use that function when merged
|
||||
function getApiKey () {
|
||||
let AUTH_SETTINGS = localStorage.getItem('habit-mobile-settings');
|
||||
let AUTH_SETTINGS = localStorage.getItem(LOCALSTORAGE_AUTH_KEY);
|
||||
|
||||
if (AUTH_SETTINGS) {
|
||||
AUTH_SETTINGS = JSON.parse(AUTH_SETTINGS);
|
||||
|
||||
Reference in New Issue
Block a user