Giter Site home page Giter Site logo

Comments (10)

cocojoe avatar cocojoe commented on May 24, 2024

Can you share with me the code you are calling authentication with and the connection type, please don't paste any credentials.

from auth0.swift.

HuppDevelopers avatar HuppDevelopers commented on May 24, 2024

hey thanks for reply @cocojoe
sorry for late reply.

here is my code...

`@IBAction func didPressLogin(_ sender: UIButton) {

    print("Login button pressed")

    Lock
        .classic()
        
        .withOptions {
            $0.logLevel = .all
            $0.logHttpRequest = true
            $0.closable = true
            $0.allow = [.Login]
            $0.usernameStyle = [.Email]
        }

        .withConnections({ (connections) in
            connections.database(name: "Username-Password-Authentication", requiresUsername: true)
        })
        
        .withStyle {
            $0.title = "XYZ Ltd"
            $0.titleColor = UIColor.black
            $0.logo = LazyImage(name: "company_logo")
            $0.headerColor = UIColor.white
            $0.primaryColor = UIColor(red: 0.5, green: 0.5, blue: 0.5, alpha: 1.0)
        }
        
        .onAuth {
            
            Auth0
                
                .authentication()
                
                .userInfo(token: $0.accessToken!)
                .start({ (result) in
                    switch (result)
                    {
                        case .success(let profile):
                            
                            print(profile)
                        
                        case .failure(let ignore):
                            print(ignore)
                    }
                })
        }
        .onError {
            
            print("Failed with \($0)")
        }
        
        .onCancel {
            
            print("User cancelled")
        }
        
        .present(from: self)
}`

from auth0.swift.

cocojoe avatar cocojoe commented on May 24, 2024

Is this during the Authentication or during userInfo call? You can add logging to the authentication instance with

        var auth = Auth0.authentication()
        _ = auth.logging(enabled: true)
        auth.userInfo...

Can you provide the logging out please from console, redact your actual username/pass though :)

from auth0.swift.

HuppDevelopers avatar HuppDevelopers commented on May 24, 2024

I thing this is during Authentication but not sure...

this is my logged output...

POST url
Auth0-Client: clientId
Content-Type: application/json

{"grant_type":"password","client_id":"abcdabcdabcd","connection":"Username-Password-Authentication","scope":"openid","username":"myUsername","password":"myPassword"}

HTTP/1.1 500
Content-Type: application/json; charset=utf-8
Content-Length: 81
Connection: keep-alive
Set-Cookie: auth0=s%3AGmsSFtWROjcr22osQ5JSSUVy_DqTQnaR.Rm0hsSgdo450D6%2FfOBCF32TA2OAgpSvNELBIWChJTTg; Path=/; Expires=Sat, 08 Jul 2017 09:25:36 GMT; HttpOnly; Secure
X-Auth0-RequestId: 2af5090c19645f9199fb
Keep-Alive: timeout=100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1499250584
Date: Wed, 05 Jul 2017 09:25:36 GMT
Cache-Control: no-cache
X-RateLimit-Limit: 100

{"error":"access_denied","error_description":"secret must be a string or buffer"}

Failed with couldNotLogin

from auth0.swift.

cocojoe avatar cocojoe commented on May 24, 2024

Thanks, also what version of Lock are you using and is there any more information given in the Auth0 dashboard if you click on Logs?

from auth0.swift.

HuppDevelopers avatar HuppDevelopers commented on May 24, 2024

I am using 'Lock', '~> 2.0'

**Summary**
Occurred	12 minutes agoat 2017-07-05 09:25:36.768 UTC
Type	Failed Login
Description	secret must be a string or buffer
Connection	Username-Password-Authentication
Application	myApp
User	myUsername

**Context Data**
{
  "body": {
    "grant_type": "password",
    "client_id": "clientID",
    "connection": "Username-Password-Authentication",
    "scope": "openid",
    "username": "myUsername",
    "password": "myPassword"
  },
  "qs": {},
  "connection": "Username-Password-Authentication",
  "error": {
    "message": "secret must be a string or buffer",
    "oauthError": "secret must be a string or buffer",
    "type": "access_denied"
  },
  "stats": {
    "loginsCount": 213
  }
}

from auth0.swift.

cocojoe avatar cocojoe commented on May 24, 2024

Thanks I've looked into this, it appears the error is to do with one of the rules you have setup. Perhaps something was modified in your rules 3 days ago... I suggest you review your rule code and find the breaking point.

from auth0.swift.

HuppDevelopers avatar HuppDevelopers commented on May 24, 2024

okay...

let me check, I will revert here if I could not accomplish it...

Thanks for your efforts and great help... :)

from auth0.swift.

HuppDevelopers avatar HuppDevelopers commented on May 24, 2024

@cocojoe
I can't find solution yet. Will you please help me out?

from auth0.swift.

cocojoe avatar cocojoe commented on May 24, 2024

It would be best if you get in touch with our support team to help resolve this. Please reference this issue.

https://support.auth0.com

Thanks

from auth0.swift.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.