Strip whitespaces from tokens (#558)
This commit is contained in:
@@ -704,8 +704,9 @@ const SetNewPasswordForm = ({
|
||||
|
||||
try {
|
||||
const agent = new BskyAgent({service: serviceUrl})
|
||||
const token = resetCode.replace(/\s/g, '')
|
||||
await agent.com.atproto.server.resetPassword({
|
||||
token: resetCode,
|
||||
token,
|
||||
password,
|
||||
})
|
||||
onPasswordSet()
|
||||
|
||||
@@ -42,11 +42,13 @@ export function Component({}: {}) {
|
||||
const onPressConfirmDelete = async () => {
|
||||
setError('')
|
||||
setIsProcessing(true)
|
||||
const token = confirmCode.replace(/\s/g, '')
|
||||
|
||||
try {
|
||||
await store.agent.com.atproto.server.deleteAccount({
|
||||
did: store.me.did,
|
||||
password,
|
||||
token: confirmCode,
|
||||
token,
|
||||
})
|
||||
Toast.show('Your account has been deleted')
|
||||
resetToTab('HomeTab')
|
||||
|
||||
Reference in New Issue
Block a user