Auth0 Home Blog Docs

Auth0, Github Swift App, Scope not handling gist


#1

I am trying to authenticate with github to allow gist commenting in my swift app.

I have configured github app correctly with id’s and scope selected.
In Auth configuration I believe I have setup my app details correct and everything seems ok. I followed guides.

In my App I am trying to authenticate like so

            Auth0
            .webAuth()
            .connection("github")
            //.connectionScope("gist")
            .scope("gist")
            .audience("https://pjdavis1970.eu.auth0.com/userinfo")
            .start {
                switch $0 {
                case .failure(let error):
                    // Handle the error
                    print("Error: \(error)")
                case .success(let credentials):
                    // Do something with credentials e.g.: save them.
                    // Auth0 will automatically dismiss the login page
                    credentialsManager.store(credentials: credentials)
                    DispatchQueue.main.async {
                        
                        self.setButtonStatus(status: true)
                    }
                }
        }

As you can see I have tried connectionScope as well as scope.

Nothing is coming back for scope when it logs in. Everything else seems ok. When I do the login in the app I get the correct github login page with it stating I have Create gist access etc.

Please help if you can I have spent over 24 hours on this and im about to throw my mac out window :slight_smile: