Welcome Guest, Not a member yet? Register   Sign In
A3M - Account Authentication & Authorization Module

[eluser]Schnyder[/eluser]
Does a3m allow us to specify an alternat callback URL when using twitter authentication? My site has separate development, QA, and Production level URLs, and all need to be able to use the single Twitter app to authenticate. So, I cannot have a single callback url specified in my Twitter app's configuration... I need to be able to pass the callback URL to the Twitter API as a parameter. Does a3m support this?

Thanks,
Chris

[eluser]Peng Kong[/eluser]
hi chris,

this is a twitter limitation rather then a a3m limitation right?
meaning that twitter only allows you to specify one callback url per twitter application on their application management console website. it is for security reasons i think...

you should create 3 twitter apps and give each environment a different twitter app key and secret just like how it has a different base url, meaning it has different config.php. so why shouldn't it have a different twitter.php config file too? config files should be different in different environments.

[eluser]Peng Kong[/eluser]
btw chris i hope you're using the new version 1.0.

[eluser]codeninja[/eluser]
@peng: have you updated the code for user roles / management stuff?

[eluser]Schnyder[/eluser]
Peng, I figured out how to pass twitter the appropriate callback url. Since the connect_twitter controller handles both the redirection to twitter for authentication as well as the postback, I just updated connect_twitter.php, with the following change:

ORIGINAL LINE:
Code:
$tempURL = $this->twitter_lib->etw->getAuthenticateUrl();

REPLACEMENT LINES:
Code:
$callbackURL = current_url();
$tempURL = $this->twitter_lib->etw->getAuthenticateUrl(null, array('oauth_callback'=>$callbackURL));

Now twitter calls back to the same URL, regardless of what URL you have configured on your Twitter app account... and that works just fine for me.

thanks,
Chris

[eluser]Peng Kong[/eluser]
cool!

[eluser]Peng Kong[/eluser]
[quote author="codeninja" date="1295174967"]@peng: have you updated the code for user roles / management stuff?[/quote]

nope not yet -.-

[eluser]KarlBallard[/eluser]
This looks like what I was looking for, however I'll have to edit it because I don't like phpass.

[eluser]SpitefulTowel[/eluser]
Has anyone installed this with a PostgreSQL backend yet?

[eluser]Peng Kong[/eluser]
shouldn't be too hard since i work all the sql with the AR class.
juz port the database tables over to PostgreSQL and some simply config to the db connect should do the trick.




Theme © iAndrew 2016 - Forum software by © MyBB