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