-async function getAccessTokenOrDie (url: string, user: UserInfo) {
- const resClient = await getClient(url)
- const client = {
- id: resClient.body.client_id,
- secret: resClient.body.client_secret
- }
-
- try {
- const res = await login(url, client, user)
- return res.body.access_token
- } catch (err) {
- exitError('Cannot authenticate. Please check your username/password.')
- }
-}
-