Conversation
Can the provider automatically synthesize the box redirect url for you? That seems like something the consumer should not have to do. |
Oh wait you're saying you tried that and it didn't work? |
Yes the provider should do it.. I was trying to update |
Do you need to store it in options or can you just synthesize it where it is needed? |
Will need it in the target url check |
If you only need it in the web view controller, I would make a mutable copy of If you need it in other places, consider making a private, read-only property in the provider that returns the synthesized value that you can use elsewhere. I would not override the options accessor or try to mutate it. It is immutable for a reason. |
Actually, you can override |
Will try, thanks |
Hey Caleb, the provider now takes care of redirect URI so the user can just set SimpleAuth.configuration[@"box-web"] = @{
@"client_id":@"CLIENT_ID",
@"client_secret":@"CLIENT_SECRET",
}; Worked in the example app |
There's a bit of code duplication for how that redirect URI is generated, let me know if that's ok or how it could be improved (class method on |
I flattened the Would you mind pulling my The specific change can be seen in 35e9ea5 if you are curious. |
If it looks good to you I'll merge the branch into |
Ok will try it out |
Conflicts: Example/SimpleAuth/SADProviderListViewController.m
Tried out the changes 👍 |
Uh.. |
Your commits are now in master. You didn't pull the right branch from my repo into yours so none of the changes I made where in there. Just easier to merge it myself and close. |
Which now leads me to wonder: did you check out my |
Caleb I tested master, we are all good |
Awesome! Thanks again for your work on this! |
😄 |
Hey Caleb, would love for you to take a look
I tested this successfully with the example app although setting up Box to work in an app requires a special redirect URI in the format
boxsdk-YOUR_CLIENT_ID://boxsdkoauth2redirect
(source)As you can see, we can get the redirect URI from the CLIENT_ID but I couldn't get this to work so for now, you have to set