Unable to get Access or Id token using Okta-Auth-JS (singInWithCredentials)

I am facing a issue where upon using method signInWithCredentials() I am not getting the access token or Id token and unable to call getUserInfo()

async handleSignInResponse(transaction: AuthnTransaction) {
if (transaction.status !== ‘SUCCESS’) {
throw new Error(We cannot handle the ${transaction.status} status);
.then((value:any) => {
console.info("Access token: " + value.accessToken);

await this._authClient.session.setCookieAndRedirect(transaction.sessionToken);


public login(username: string, password: string): Observable {
return from(this._authClient.signInWithCredentials({username, password})).pipe(
map((t) => {
console.log('t → ', t);
// this.getUser();

Did you check to see if the request to Okta succeeded? If you log the transaction, what does it look like? Did it result in a “SUCCESS”, or does the user maybe need to verify an additional factor in order to complete primary authentication?

If you’re not familiar with the /authn transaction states, you can find a diagram of the flow for the /authn endpoint (used by signInWithCredentials) here: Authentication | Okta Developer