swift – iOS Firebase sign in with custom token not working on Some devices (XCode 15)

[ad_1]

When login with firebase it getting following error in some devices.
Error:- An internal error has occurred, print and inspect the error details for more information.

  • This App uploaded on app store testflight.
  • Also app uninstalled then install new app.
  • After facing this issue i was verify GoogleService-Info.plist file. (it is correct)
  • Also verified on firebase console for all services are enabled or not. (services are enabled)
  • On server check refreshToken token generate is correct or not. (it is correct)

Following is my code

Auth.auth().signIn(withCustomToken: refreshToken) { _, error in
    if let authError = error {
        log.debug(authError.localizedDescription)
        //Error:- An internal error has occurred, print and inspect the error details for more information.
        return
    } else {
        self.goToNextStep()
    }
}

//refreshToken = Token generated from server
//refresh Token sample:- eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJmaXJlYmFzZS1hZG1pbnNkay1YWFhAWFhYLVhYWC1YWC5pYW0uZ3NlcnZpY2VhY2Nv
dW50LmNvbSIsImF1ZCI6Imh0dHBzOi8vaWRlbnRpdHl0b29sa2l0Lmdvb2dsZWFwaXMuY29tL2dv
b2dsZS5pZGVudGl0eS5pZGVudGl0eXRvb2xraXQudjEuSWRlbnRpdHlUb29sa2l0IiwiZXhwIjox
NzAxNzU5MDAwLCJpYXQiOjE3MDE3NTU0MDAsInN1YiI6ImZpcmViYXNlLWFkbWluc2RrLVhYWEBk
WFhYLVhYWC5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsInVpZCI6IlhYWFhYWCJ9.SIGNATURE

Some device getting above error. How i can resolve this issue?

it perfectly work on my simulators (iPhone 15 (iOS 17), iPhone 15 Pro (iOS 17)).
it perfectly working on my all devices (iPhone XS (iOS 15, iOS 16), iPhone 14 pro (iOS 17)).

I want to fix this issue or trace why this issue produce.

[ad_2]

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top