ci: remove prettier and use eslint for formatting
This commit is contained in:
+11
-11
@@ -57,10 +57,10 @@ export const useAuth = (onRedirectCallback: (appState?: any) => void = DEFAULT_R
|
||||
.then(() => {
|
||||
return instance.auth0Client?.then(client => client.getUser())
|
||||
.then((user) => {
|
||||
instance.user.value = user
|
||||
instance.isAuthenticated.value = true
|
||||
instance.error.value = null
|
||||
}
|
||||
instance.user.value = user
|
||||
instance.isAuthenticated.value = true
|
||||
instance.error.value = null
|
||||
}
|
||||
)
|
||||
})
|
||||
.catch((e) => {
|
||||
@@ -83,8 +83,8 @@ export const useAuth = (onRedirectCallback: (appState?: any) => void = DEFAULT_R
|
||||
},
|
||||
/** Returns the access token. If the token is invalid or missing, a new one is retrieved */
|
||||
getTokenSilently: (o: GetTokenSilentlyOptions) => {
|
||||
return instance.auth0Client!.then(client => {
|
||||
return client.getTokenSilently(o).catch(e => {
|
||||
return instance.auth0Client!.then((client) => {
|
||||
return client.getTokenSilently(o).catch((e) => {
|
||||
instance.error.value = e
|
||||
})
|
||||
})
|
||||
@@ -97,19 +97,19 @@ export const useAuth = (onRedirectCallback: (appState?: any) => void = DEFAULT_R
|
||||
|
||||
const fetchUser = () => {
|
||||
return instance.auth0Client!.then(client => client.isAuthenticated())
|
||||
.then(a => {
|
||||
.then((a) => {
|
||||
instance.auth0Client?.then(client => client.getUser()
|
||||
.then(u => {
|
||||
.then((u) => {
|
||||
instance.isAuthenticated.value = a
|
||||
instance.user.value = u
|
||||
instance.error.value = null
|
||||
}))
|
||||
})
|
||||
}
|
||||
// Create a new instance of the SDK client using members of the given options object
|
||||
// Create a new instance of the SDK client using members of the given options object
|
||||
instance.auth0Client = createAuth0Client(options)
|
||||
instance.auth0Client
|
||||
.then(client => {
|
||||
.then((client) => {
|
||||
instance.loading.value = true
|
||||
// If the user is returning to the app after authentication..
|
||||
if (
|
||||
@@ -120,7 +120,7 @@ export const useAuth = (onRedirectCallback: (appState?: any) => void = DEFAULT_R
|
||||
) {
|
||||
// handle the redirect and retrieve tokens
|
||||
return client.handleRedirectCallback()
|
||||
.then(result => {
|
||||
.then((result) => {
|
||||
// Notify subscribers that the redirect callback has happened, passing the appState
|
||||
// (useful for retrieving any pre-authentication state)
|
||||
onRedirectCallback(result.appState)
|
||||
|
||||
Reference in New Issue
Block a user