Publish an OAuth Google Login App For Free Using Heroku, ReactJS, and Java Spring Boot

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024

ความคิดเห็น • 11

  • @tofuyam7361
    @tofuyam7361 3 ปีที่แล้ว

    Seem to have a problem picking the node_env in the keys file. I had to point to both as ./prod

    • @TechTutorRyan
      @TechTutorRyan  3 ปีที่แล้ว

      Running locally or on Heroku?

    • @tofuyam7361
      @tofuyam7361 3 ปีที่แล้ว

      @@TechTutorRyan in heroku, i console out log the node_env in heroku and it shows 'production' in one line and 'undefine' in the second line.

    • @tofuyam7361
      @tofuyam7361 3 ปีที่แล้ว

      @@TechTutorRyan just to point out, i am not using the build pack you listed. I just uploaded using the heroku cli, but it look like the herokupostbuild got exectuted

    • @TechTutorRyan
      @TechTutorRyan  3 ปีที่แล้ว

      @@tofuyam7361 I think I encountered the same issue with the default buildpack and that is why I used a specific buildpack for it to work.

  • @ignaciobriones3769
    @ignaciobriones3769 2 ปีที่แล้ว

    where did u get that url in the 13:41 for react ?:(

    • @TechTutorRyan
      @TechTutorRyan  2 ปีที่แล้ว

      I can't remember how I found it since this was over a year ago. I am pretty sure I was reading through the Heroku forums, because it had previously worked with their default settings and then I had to set a buildpack manually during this video to fix it.
      devcenter.heroku.com/articles/buildpacks

  • @arh4t
    @arh4t 3 ปีที่แล้ว

    Hi, i have a question i deployed an app based on yours in jenkins but after the google authentication /oauth2/redirect it shows me an 404 not found, it's exactly the same as in my google console, it runs okey in local but for some reason it isn't able to redirect when it's deployed. What does the geturlparameter in the oauthhandler? do you have any idea why would this happen? Thanks for your attention.

    • @TechTutorRyan
      @TechTutorRyan  3 ปีที่แล้ว

      I am thinking you are referring to the server configuration. As you can see around 17:40 I am setting some values for the server so that it knows where to redirect to as long as Google successfully validates the user. You will need to make sure that you have added both the client and server URLs to the Authorized redirect URIs in the Google Cloud platform. You could be getting a 404, because it may not be routing properly to your client application URL.
      As far as the OAuthHandler, I think you are referring to the success and failure handlers in the server code. For both of these you shouldn't need to make any changes, because any custom URLs should be handled by the AppConfig class, which is getting values from that time I was mentioning around the 18 minute mark. Otherwise you can also see where I set the same values for local runs in the application-local.yml.