mirror of
https://github.com/tooot-app/app
synced 2025-01-03 13:10:23 +01:00
More permissive logging in
This commit is contained in:
parent
8aeeb1d806
commit
a8243adf51
@ -52,7 +52,7 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
!!domain.length &&
|
!!domain.length &&
|
||||||
!!errorCode &&
|
!!errorCode &&
|
||||||
!!(Linking.parse(`https://${domain}/`).hostname === domain) &&
|
!!(Linking.parse(`https://${domain}/`).hostname === domain) &&
|
||||||
errorCode === 401
|
(errorCode === 401 || errorCode === 500)
|
||||||
|
|
||||||
const instanceQuery = useInstanceQuery({
|
const instanceQuery = useInstanceQuery({
|
||||||
domain,
|
domain,
|
||||||
@ -80,7 +80,7 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
clientSecret,
|
clientSecret,
|
||||||
scopes: variables.scopes,
|
scopes: variables.scopes,
|
||||||
redirectUri,
|
redirectUri,
|
||||||
usePKCE: !['pawoo.net', 'mao.mastodonhub.com'].includes(domain)
|
usePKCE: !['pawoo.net'].includes(domain)
|
||||||
})
|
})
|
||||||
await request.makeAuthUrlAsync(discovery)
|
await request.makeAuthUrlAsync(discovery)
|
||||||
|
|
||||||
@ -131,7 +131,8 @@ const ComponentInstance: React.FC<Props> = ({
|
|||||||
((instanceQuery.data as Mastodon.Instance_V1)?.uri
|
((instanceQuery.data as Mastodon.Instance_V1)?.uri
|
||||||
? Linking.parse((instanceQuery.data as Mastodon.Instance_V1).uri).hostname
|
? Linking.parse((instanceQuery.data as Mastodon.Instance_V1).uri).hostname
|
||||||
: undefined) ||
|
: undefined) ||
|
||||||
(instanceQuery.data as Mastodon.Instance_V1)?.uri,
|
(instanceQuery.data as Mastodon.Instance_V1)?.uri ||
|
||||||
|
domain,
|
||||||
'auth.account.avatar_static': avatar_static,
|
'auth.account.avatar_static': avatar_static,
|
||||||
version: instanceQuery.data?.version || '0',
|
version: instanceQuery.data?.version || '0',
|
||||||
preferences: undefined,
|
preferences: undefined,
|
||||||
|
@ -34,5 +34,7 @@ const features: { feature: Features; version: number }[] = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
export const featureCheck = (feature: Features, v?: string): boolean =>
|
export const featureCheck = (feature: Features, v?: string): boolean =>
|
||||||
(features.find(f => f.feature === feature)?.version || 999) <=
|
v
|
||||||
|
? (features.find(f => f.feature === feature)?.version || 999) <=
|
||||||
parseFloat(v || getAccountStorage.string('version'))
|
parseFloat(v || getAccountStorage.string('version'))
|
||||||
|
: false
|
||||||
|
Loading…
Reference in New Issue
Block a user