mirror of
https://github.com/lemeow125/StudE-Frontend.git
synced 2025-06-28 16:25:46 +08:00
Polished revalidation and login. Opted to not store tokens anymore in state but only in asyncstorage
This commit is contained in:
parent
92b8ce0e4e
commit
a027115836
5 changed files with 14 additions and 20 deletions
|
@ -92,7 +92,7 @@ export async function TokenRefresh() {
|
|||
"Token refresh success! New Access Token",
|
||||
response.data.access
|
||||
);*/
|
||||
return [true, getAccessToken()];
|
||||
return [true, JSON.stringify(response.data.access)];
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Refresh Failed: " + JSON.stringify(error.response.data));
|
||||
|
|
|
@ -53,7 +53,7 @@ export default function CustomDrawerContent(props: {}) {
|
|||
<SignupIcon size={32} />
|
||||
<Text style={styles.text_white_medium}>Register</Text>
|
||||
</DrawerButton>
|
||||
<DrawerButton
|
||||
{/*<DrawerButton
|
||||
color={colors.blue_2}
|
||||
onPress={() => {
|
||||
navigation.navigate("Revalidation");
|
||||
|
@ -71,6 +71,7 @@ export default function CustomDrawerContent(props: {}) {
|
|||
<AddIcon size={32} />
|
||||
<Text style={styles.text_white_medium}>Activation</Text>
|
||||
</DrawerButton>
|
||||
*/}
|
||||
</DrawerContentScrollView>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue