No matter what I enter into the redirect URI field trying the Spotify tutorial, the actual request when running the app continues to use creolabs default URI (see attached screen as configured).
The actual request is generated as below... (redacted)
No matter what I enter into the redirect URI field trying the Spotify tutorial, the actual request when running the app continues to use creolabs default URI (see attached screen as configured).
The actual request is generated as below... (redacted)
We need to use our redirec_uri when simulating the app in Creo for Mac and in CreoPlayer for iOS, the custom request_uri is used in the standalone app generated with the build command.
With a custom URI in the simulators, Creo would not be notified when that URI is processed by the OS.
To be able to test your app inside the Creo simulators, you must add the creolabs default URI as a valid redirect URI in the configuration of your Oauth service.
Thanks Andrea, the penny was just starting to drop re adding your url to my testing Spotify app.
@andrea Should your default request redirect_uri not have a double forward slash?
Spotify overlooks this, but other api's will not allow it. (See screen grab from Dribbble attached).
@doobox You are right, the creo default redirect_uri will have a double forward slash in the next update.
Could you please confirm that the API you are using accepts a Callback URL like 'com.creolabs.creo://oauth2Callback' ?
@Andrea Yes that particular API (Dribble) does indeed accept "com.creolabs.creo://oauth2Callback"
Just rejects "com.creolabs.creo:/oauth2Callback" (single slash).
@doobox thank you for the feedback!
I'm still not able to make the spotify example run. I'm constantly getting this error:
INVALID_CLIENT: Invalid redirect URI
my Bundle ID is : com.osswald.spoty
In the spotify developer dashboard and in creos HTTP client server configuration properties I tried setting this as redirect URI:
com.osswald.spoty:/oauth2Callback
or
com.osswald.spoty://oauth2Callback
when running the app, I am getting "Invalid redirect URI" in both cases.
So, is this example working for anybody and if yes, what am I missing?
com.creolabs.creo:/oauth2Callback
Is the default redirect uri Creo is using. This would also need to go in the Spotify dashboard as a whitelisted uri.
When you see that error in the browser, look at the url. You can see the entire request that was made in the url.
See above though... this will change to double forward slash in the next version.
@doobox : Thanks, I got it!
When we try to change the redirect URI to have the double / it still loads on the next screen showing the single / URI and asking which application on the computer should open the response.
How did you get it to accept the new URI with the double backslash?
The update that changes the default redirect URL with the double / will be released in the next few days.
The current version of Creo (1.0.2) still uses com.creolabs.creo:/oauth2Callback
(with one /) when the project is executed in the Creo simulator.
The default redirect URL has been changed in the new version Creo 1.0.3. The spotify tutorial has been updated too (point 5, 6 and 7).
I'm still having difficulties with the new redirect URI scheme.
During development within Creo everything works fine. My chosen api (Dribbble) now accepts the Creo default redirect uri in my Dribbble app dashboard.
Also works fine in Creo player (from TestFlight app)
Now I'm at a stage of testing as a standalone installed on iPhone, I'm having issues.
I changed the redirect uri in my http request object
from
com.creolabs.creo://oauth2Callback
to
uk.co.garysimpson.balllin://oauth2Callback
I also changed the redirect uri in my Dribbble app dashboard
from
com.creolabs.creo://oauth2Callback
to
uk.co.garysimpson.balllin://oauth2Callback
My app bundle id is set to : uk.co.garysimpson.balllin
I rebuild a new ipa file for development distribution.
I deleted the old instance from iPhone and installed the freshly built ipa.
On launch I see my own splash screen for a split second, then I see the creo splash screen and activity indicator for around 5 seconds (poss unrelated bug).
After splash screen the app moves to Safari with the http request to the Dribbble api.
On clicking Authorise I get a prompt from Safari that the url can not be opened because it is invalid.
I'm unsure what my application is actually passing to Safari as the redirect parameter of the request in this build, but assume it should be uk.co.garysimpson.balllin://oauth2Callback as now set in the http request, and the Dribbble app dashboard.
@doobox,
maybe the missing part is to allow your app to be launched using the callback URL.
I added the point #6 to the spotify tutorial to explain how to do this, have you done this configuration?
To allow your app to be launched using an URL (in this case the custom Redirect URI), you’ll need to add a few entries to the App property list. To do that, open the Properties panel from the "Main Menu" -> "Project" -> "Properties...", add an Array with name "CFBundleURLTypes"if not existing, add a Dictionary in this array, add an array named "CFBundleURLSchemes" in the Dictionary and finally add a string with the scheme part of the custom Redirect URI (i.e. "com.creolabs.spotifydemo")
EDIT: in your case you should add uk.co.garysimpson.balllin
in the CFBundleURLSchemes property
@Andrea Thank's. That was the missing piece. I had thought Creo added the url scheme to the plist automatically, having last looked at the Spotify tut before it was updated.
I had thought Creo added the url scheme to the plist automatically...
This is in my todo list
Hi, i'm having problem connecting to snapchat. I get "Invalid redirect_uri." response when testing.
Is this correct: com.creolabs.creo://oauth2Callback https://puu.sh/EM7Mq.png
@taiheta,com.creolabs.creo://oauth2Callback
is correct but in your screenshot there is an invalid URL with the https:// schema: https://com.creolabs.creo://oauth2Callback.
URLs with the https schema work with web apps, for iOS apps you need to use callback URLs with a custom schema that open your app.