I am trying to understand how to do OAuth within Swift, especially I certify with OAuth 2 and Eventbrite I am trying to do I believe that everything I have has been set up at my end:
func doOAuthEventbrite () {oauthswift = OAuth2Swift (consumer: EventBrite ["consumer"]! ConsumerCyCact: Eventbrat ["ConsumerCyctit"]!, AuthorizeUrl: "https://www.eventbrite.com/oauth/authorize", Reaction type: "token") oauthswift.authorizeWithCallbackURL (string: "eventbriteanalytics: // oauth-callback / eventbrite") !, Scope: "", Status: "", Success: {println (credential.oauth_token)}} Failure: {{Error: NSError!} - & gt; Println in zero (error.localizedDescription)}}}}}
However when I go to Eventbrite OAuth page (after accepting that I should be connected to this application with my account I have met with 'oops something went wrong'! Error. The URL is the following:
My expected behavior is that redirect_uri goes back to the app even though it only remains in Safari
form of a prudent investigation In, I was able to run an operation against an Instagram application and everything worked fine (the received code was used) and it was sent back to the app (so no problem was wrong in my URL scheme).
Review the Eventbrite documentation, he provided the following guidance for redirect_uri:
'This value should be included in a web address, to configure the API key in which the user After accepting or rejecting the authorization for your app, you want to set this value for mobile clients, development or testing purposes. '
My question is how can I return the user back to the app when they do not have my URL scheme valid, so I can retrieve the access code and thus get access token Am I
As a prudent inquiry, I was able to run an operation against an Instagram app And everything worked fine (the received code was used) and it was sent back to the app itself (so there is no problem with my URL scheme).
You can be one of the few people working in Swift. Do you have an example of a code, so we can review what you did and perhaps could help with answering the question?
Thanks
No comments:
Post a Comment