<commit_before>import {
	call,
	put,
	takeLatest,
	race
} from 'redux-saga/effects'
import { delay } from 'redux-saga'
import { Alert } from 'react-native'

import ssoService from '../services/ssoService'
import { SSO_TTL, SSO_IDP_ERROR_RETRY_INCREMENT } from '../AppSettings'
import logger from '../util/logger'

const auth = require('../util/auth')

function* doLogin(action) {
	const {
		username,
		password,
	} = action

	// DEMO ACCOUNTS
	if (username === 'studentdemo' && password === '<PASSWORD>') {
		yield put({ type: 'LOG_IN_REQUEST' })
		yield put({ type: 'ACTIVATE_STUDENT_DEMO_ACCOUNT' })
		yield call(delay, 750)

		// Successfully logged in
		yield auth.storeUserCreds(username, password)

		// Set up user profile
		const newProfile = {
			username: 'Student Demo',
			pid: 'fakepid',
			classifications: { student: true }
		}

		yield put({ type: 'LOGGED_IN', profile: newProfile })
		yield put({ type: 'LOG_IN_SUCCESS' })
		yield put({ type: 'TOGGLE_AUTHENTICATED_CARDS' })

		// Clears any potential errors from being
		// unable to automatically reauthorize a user
		yield put({ type: 'AUTH_HTTP_SUCCESS' })<commit_msg>Update demo credentials<commit_after>import {
	call,
	put,
	takeLatest,
	race
} from 'redux-saga/effects'
import { delay } from 'redux-saga'
import { Alert } from 'react-native'

import ssoService from '../services/ssoService'
import { SSO_TTL, SSO_IDP_ERROR_RETRY_INCREMENT } from '../AppSettings'
import logger from '../util/logger'

const auth = require('../util/auth')

function* doLogin(action) {
	const { username, password } = action

	// DEMO ACCOUNTS
	if ((username === 'studentdemo' && password === '<PASSWORD>') ||
		(username === 'demo' && password === '<PASSWORD>')) {
		yield put({ type: 'LOG_IN_REQUEST' })
		yield put({ type: 'ACTIVATE_STUDENT_DEMO_ACCOUNT' })
		yield call(delay, 750)

		// Successfully logged in
		yield auth.storeUserCreds(username, password)

		// Set up user profile
		const newProfile = {
			username: 'Student Demo',
			pid: 'fakepid',
			classifications: { student: true }
		}

		yield put({ type: 'LOGGED_IN', profile: newProfile })
		yield put({ type: 'LOG_IN_SUCCESS' })
		yield put({ type: 'TOGGLE_AUTHENTICATED_CARDS' })

		// Clears any potential errors from being
		// unable to automatically reauthorize a user
		yield put({ type: 'AUTH_HTTP_SUCCESS' })
{'fraction_non_alphanumeric': 0.13877028181041845, 'fraction_numerical': 0.0025619128949615714, 'mean_word_length': 4.1381578947368425, 'pattern_counts': {'":': 0, '<': 6, '<?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': '2090983', 'n_tokens_mistral': 866, 'n_tokens_neox': 778, 'n_words': 216}