Strider-CD / strider-heroku

Strider plugin for heroku deployment
2 stars 8 forks source link

Adding an heroku account oauth redirects back to localhost:3000 instead of my configured url #1

Closed morkeleb closed 9 years ago

morkeleb commented 10 years ago

callback url becomes: http://localhost:3000/ext/heroku/oauth/callback?code=

Adding through Account/Heroku/Add Account

If I change the url in the callback for the browser I get a set of private and public keys.

niallo commented 10 years ago

This feels like it may be due to the default Heroku OAuth application being in use. Due to the way OAuth works, you'll need to create your own, with your custom callback URL, and then configure Strider with it.

@jaredly is that configurable yet?

jaredly commented 10 years ago

yup, should be. You'll need to set the STRIDER_SERVER_NAME env variable to " https://my-domain.com" [no trailing slash] and it should work for you. I don't think Heroku's OAuth enforces the callback url from the application side.

On Sun, Nov 3, 2013 at 11:13 AM, niallo notifications@github.com wrote:

This feels like it may be due to the default Heroku OAuth application being in use. Due to the way OAuth works, you'll need to create your own, with your custom callback URL, and then configure Strider with it.

@jaredly https://github.com/jaredly is that configurable yet?

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27650182 .

morkeleb commented 10 years ago

Is that a name change? because I'm setting SERVER_NAME.

On Sun, Nov 3, 2013 at 8:37 PM, Jared Forsyth notifications@github.comwrote:

yup, should be. You'll need to set the STRIDER_SERVER_NAME env variable to " https://my-domain.com" [no trailing slash] and it should work for you. I don't think Heroku's OAuth enforces the callback url from the application side.

On Sun, Nov 3, 2013 at 11:13 AM, niallo notifications@github.com wrote:

This feels like it may be due to the default Heroku OAuth application being in use. Due to the way OAuth works, you'll need to create your own, with your custom callback URL, and then configure Strider with it.

@jaredly https://github.com/jaredly is that configurable yet?

— Reply to this email directly or view it on GitHub< https://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27650182>

.

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27652106 .

http://www.morkeleb.com

jaredly commented 10 years ago

hmm SERVER_NAME should work too. ok, I'll have to do some digging around. should get to it tomorrow.

On Sun, Nov 3, 2013 at 12:42 PM, Morten Nielsen notifications@github.comwrote:

Is that a name change? because I'm setting SERVER_NAME.

On Sun, Nov 3, 2013 at 8:37 PM, Jared Forsyth notifications@github.comwrote:

yup, should be. You'll need to set the STRIDER_SERVER_NAME env variable to " https://my-domain.com" [no trailing slash] and it should work for you. I don't think Heroku's OAuth enforces the callback url from the application side.

On Sun, Nov 3, 2013 at 11:13 AM, niallo notifications@github.com wrote:

This feels like it may be due to the default Heroku OAuth application being in use. Due to the way OAuth works, you'll need to create your own, with your custom callback URL, and then configure Strider with it.

@jaredly https://github.com/jaredly is that configurable yet?

— Reply to this email directly or view it on GitHub<

https://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27650182>

.

— Reply to this email directly or view it on GitHub< https://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27652106>

.

http://www.morkeleb.com

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-27652239 .

fohtoh commented 10 years ago

Any more info on this? I am also trying to add a heroku deployment to my Strider install. When I click on the "Add a Heroku Account" on the plugin section, I get redirectred to localhost. I don't want localhost because it is hosted on a digital ocean site.

I have set a SERVER_NAME to my server, any other ideas on how I could get this to work so that I can have it deploy my app.

Thanks

niallo commented 10 years ago

@jaredly should be able to fill you in on the right variable names for heroku. Although I thought it didn't need any...

On Tue, Apr 22, 2014 at 2:13 PM, fohtoh notifications@github.com wrote:

Any more info on this? I am also trying to add a heroku deployment to my Strider install. When I click on the "Add a Heroku Account" on the plugin section, I get redirectred to localhost. I don't want localhost because it is hosted on a digital ocean site.

I have set a SERVER_NAME to my server, any other ideas on how I could get this to work so that I can have it deploy my app.

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/Strider-CD/strider-heroku/issues/1#issuecomment-41096572 .

Niall O'Higgins W: http://niallohiggins.com E: n@niallo.me T: @niallohiggins

fohtoh commented 10 years ago

I tried both STRIDER_SERVER_NAME and SERVER_NAME. It always comes back with localhost.

@jaredly any ideas on what is happening here? Is there any other ENV variables that I need to set?

pedronasser commented 10 years ago

I'm getting the same problem here, but with the Github webhook. I tried to follow this tutorial: http://fosterelli.co/creating-a-private-ci-with-strider.html There's any problem with that tutorial?

fohtoh commented 10 years ago

@pedronasser That is the tutorial I followed as well. There was not actually anything wrong with that tutorial. There was an issue that they fixed in the strider-github project. https://github.com/Strider-CD/strider/issues/413

The problem is that the fix will only work once they version it and strider uses the new version. So for the time being, I just went into the strider download and then the node_modules and found the strider-github and manually fixed that file. Once I did that everything worked great.

I'm not sure if there is a better way to do it before it gets versioned, if there is let me know. Also let me know if this works for you,

I'm hope @jaredly will let me know soon about this issue in heroku. I would really like to be able to get it to deploy.

fohtoh commented 10 years ago

@niallo have you been able to successfully use this heroku plugin on a non localhost install?

kfatehi commented 10 years ago

@jaredly ping

jaredly commented 10 years ago

hmmk I can reproduce

jaredly commented 10 years ago

Ooh I remember. You have to make your own api client. Register it with Heroku. https://dashboard.heroku.com/account

jaredly commented 10 years ago

And here's a docs page from heroku https://devcenter.heroku.com/articles/oauth I've added that to the readme too.

kfatehi commented 10 years ago

awesome! thanks man

kfatehi commented 10 years ago

This is totally not obvious... Not sure what to read in that article -- whatever knowledge comes from that needs to be succinctly added to the README. I will go through it now w/ @teamzone and figure it out and add to the README

kfatehi commented 10 years ago

I have another of strider v1.5.0 w/ strider-heroku v0.1.1 which is working fine (redirects to id.heroku.com)

but my other instance (strider.knban.com) is exhibiting this same issues... looking into it. hopefully can put this to bed

kfatehi commented 10 years ago

it works on a different project in the same server... trying to find out why this would be the case

kfatehi commented 10 years ago

nevermind it's broken. still stays localhost even when going through a brand new heroku flow.

teamzone commented 10 years ago

Been working with Keyvan via Hangout on this as well. Seems to need a bit more work/testing on docker. It worked fine without docker.

kfatehi commented 10 years ago

@teamzone that issue is logged in #4

this issue (localhost:3000) is separate and has nothing to do with docker.

jaredly commented 10 years ago

Is this clearer? https://github.com/Strider-CD/strider-heroku/blob/master/Readme.md

kfatehi commented 10 years ago

@jaredly yeah that's alright but if you actually go through the flow you'll see it actually seems to make no difference. I know neither of us use Heroku these days though so it's really tough to muster the effort to triage this... I'm trying to my best to see if I Can justify using Heroku for something so I can have the motivation , but when I do I end up gravitating more towards building a Docker Deploy style plugin instead...

movstox commented 9 years ago

Guys, does it mean the fresh install of Strider on DigitalOcean won't be able to use Heroku for deployment? (Callback stil redirects to localhost:3000...)

terraboops commented 9 years ago

For me, this was the solution... I was using OAUTH_ID and OAUTH_SECRET...

heroku config:add PLUGIN_HEROKU_CLIENT_ID=<CLIENT_ID_FROM_HEROKU> PLUGIN_HEROKU_CLIENT_SECRET=<CLIENT_SECRET_FROM_HEROKU>