Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
morkeleb opened this issue Nov 3, 2013 · 25 comments · Fixed by #7

Comments

@morkeleb
Copy link

morkeleb commented Nov 3, 2013

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
Copy link
Member

niallo commented Nov 3, 2013

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
Copy link
Member

jaredly commented Nov 3, 2013

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 [email protected] 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//issues/1#issuecomment-27650182
.

@morkeleb
Copy link
Author

morkeleb commented Nov 3, 2013

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

On Sun, Nov 3, 2013 at 8:37 PM, Jared Forsyth [email protected]:

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 [email protected] 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//issues/1#issuecomment-27652106
.

http://www.morkeleb.com

@jaredly
Copy link
Member

jaredly commented Nov 3, 2013

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 [email protected]:

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

On Sun, Nov 3, 2013 at 8:37 PM, Jared Forsyth [email protected]:

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 [email protected]
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//issues/1#issuecomment-27652239
.

@fohtoh
Copy link

fohtoh commented Apr 22, 2014

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
Copy link
Member

niallo commented Apr 22, 2014

@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 [email protected] 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//issues/1#issuecomment-41096572
.

Niall O'Higgins
W: http://niallohiggins.com
E: [email protected]
T: @niallohiggins

@fohtoh
Copy link

fohtoh commented Apr 23, 2014

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
Copy link

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
Copy link

fohtoh commented Apr 27, 2014

@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.
Strider-CD/strider#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
Copy link

fohtoh commented May 7, 2014

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

@kfatehi
Copy link
Member

kfatehi commented Jul 29, 2014

@jaredly ping

@jaredly
Copy link
Member

jaredly commented Jul 29, 2014

hmmk I can reproduce

@jaredly
Copy link
Member

jaredly commented Jul 29, 2014

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

@jaredly
Copy link
Member

jaredly commented Jul 29, 2014

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

@jaredly jaredly closed this as completed Jul 29, 2014
@kfatehi
Copy link
Member

kfatehi commented Jul 29, 2014

awesome! thanks man

@kfatehi kfatehi reopened this Sep 1, 2014
@kfatehi
Copy link
Member

kfatehi commented Sep 1, 2014

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
Copy link
Member

kfatehi commented Sep 1, 2014

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
Copy link
Member

kfatehi commented Sep 1, 2014

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

@kfatehi
Copy link
Member

kfatehi commented Sep 1, 2014

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

@teamzone
Copy link

teamzone commented Sep 1, 2014

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
Copy link
Member

kfatehi commented Sep 1, 2014

@teamzone that issue is logged in #4

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

@jaredly
Copy link
Member

jaredly commented Sep 1, 2014

@kfatehi
Copy link
Member

kfatehi commented Sep 2, 2014

@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
Copy link

movstox commented Nov 20, 2014

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
Copy link

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>

terraboops pushed a commit to terraboops/strider-heroku that referenced this issue Jan 27, 2015
Squashed commit of the following:

commit a8f49b8
Author: Tyler Mauthe <[email protected]>
Date:   Sun Jan 25 17:59:50 2015 -0700

    Fix typo :)

commit eb7a584
Author: Tyler Mauthe <[email protected]>
Date:   Sun Jan 25 11:47:15 2015 -0700

    Make Heroku deployment config clearer

    fixes Strider-CD/strider#677
    fixes Strider-CD#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants