'Identity server Authentication is not working in iOS

I am trying to login using identity server but it showing 404 page after authentication enter image description here

Here is the swift code i tried

let issuer = URL(string: "https://iq.app.com/coreidentityserver")!

// discovers endpoints
OIDAuthorizationService.discoverConfiguration(forIssuer: issuer) { configuration, error in
  guard let config = configuration else {
    print("Error retrieving discovery document: \(error?.localizedDescription ?? "Unknown error")")
    return
  }
    

    let request = OIDAuthorizationRequest.init(configuration: config,
                                 clientId: "1111-1111-1111-1111-1111111",
                                 clientSecret: "11111-1111-1111-1111-11111111",
                                 scopes: ["openid", "profile"],
                                 redirectURL: URL(string: "https://com.app.mobile/auth.html")!,
                                 responseType: OIDResponseTypeCode,
                                 additionalParameters: nil)
    
    guard let appDelegate = UIApplication.shared.delegate as? AppDelegate else {
        
        return
    }
    
    appDelegate.currentAuthorizationFlow = OIDAuthState.authState(byPresenting: request, presenting: self) { authState, error in

        print("auth state",authState)
        print("auth error",error)
    }

    
print("items")
  // perform the auth request...
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source