<commit_before>import { fromNow } from 'taskcluster-client-web';
import { WebAuth } from 'auth0-js';

export const webAuth = new WebAuth({
  clientID: '<KEY>',
  domain: 'auth.mozilla.auth0.com',
  responseType: 'id_token token',
  audience: 'login.taskcluster.net',
  redirectUri: `${location.protocol}//${location.host}/login.html`,
  scope: 'full-user-credentials openid profile email'
});

export const userSessionFromAuthResult = (authResult) => {
  const expiresAt = JSON.stringify((authResult.expiresIn * 1000) + Date.now());
  const userSession = {
    idToken: authResult.idToken,<commit_msg>Use taskcluster-credentials scope (#3227)<commit_after>import { fromNow } from 'taskcluster-client-web';
import { WebAuth } from 'auth0-js';

export const webAuth = new WebAuth({
  clientID: 'q8fZZFfGEmSB2c5uSI8hOkKdDGXnlo5z',
  domain: 'auth.mozilla.auth0.com',
  responseType: 'id_token token',
  audience: 'login.taskcluster.net',
  redirectUri: `${location.protocol}//${location.host}/login.html`,
  scope: 'taskcluster-credentials openid profile email'
});

export const userSessionFromAuthResult = (authResult) => {
  const expiresAt = JSON.stringify((authResult.expiresIn * 1000) + Date.now());
  const userSession = {
    idToken: authResult.idToken,
{'fraction_non_alphanumeric': 0.1437648927720413, 'fraction_numerical': 0.016679904686258934, 'mean_word_length': 5.363636363636363, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7427782', 'n_tokens_mistral': 424, 'n_tokens_neox': 411, 'n_words': 86}