Skip to content

Authentication does not fire in iOS simulator #2943

Closed

Description

@selcukbeyhan

Hi,
I followed the steps as described here to setup my IONIC project (created from scratch):
https://github.com/angular/angularfire/blob/master/docs/install-and-setup.md

I followed similar approach for authentication.
The authentication works on Web but not on iOS simulator. No error, no other message.

Page:

import { Component } from '@angular/core';
import { UserserviceService } from '../services/userservice.service';

@Component({
  selector: 'app-tab2',
  templateUrl: 'tab2.page.html',
  styleUrls: ['tab2.page.scss']
})
export class Tab2Page {

  constructor(private userService: UserserviceService,) {}

  ionViewDidEnter() {
    this.userService.loginUser({email:"xxxxxx", password:"xxxxxx"})
      .then(res => {
        console.log("Login success", JSON.stringify(res));
      }, err => {
        console.log("Login failed", JSON.stringify(err));
      })
  }
}

Service:

import { Injectable } from '@angular/core';
import { AngularFireAuth } from '@angular/fire/compat/auth';

@Injectable({
  providedIn: 'root'
})
export class UserserviceService {

  constructor(private afAuth: AngularFireAuth) { }

  loginUser(value) {
    return new Promise<any>((resolve, reject) => {
      this.afAuth.signInWithEmailAndPassword(value.email, value.password)
        .then(
          res => resolve(res),
          err => reject(err))
    })
  }
}

Any idea what can be the issue?

Thank you.

Activity

  1. google-oss-bot commented on Sep 12, 2021

    @google-oss-bot

    This issue does not seem to follow the issue template. Make sure you provide all the required information.

  2. jamesdaniels commented on Sep 14, 2021

    @jamesdaniels
    Contributor

    Converting to a discussion, if a bug is found we can open one.

  3. locked and limited conversation to collaborators on Sep 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions