10
Awlex
3y

Boss: "You hardcoded the redirect uri in the code (Early on during development and forgot about it, because apple OAuth is a piece of shit), but don't worry I fixed it by hardcoding the uri with the production host into the config file where clearly all settings are fetched from the OS Environment variables at runtime. This will surely fix the problem in staging we have, no need to thank me"

Comments
  • 0
  • 2
    I was wrong. He did make sure that staging will work... By hardcoding the staging host in the compile time config.

    My god, I wish I could reach such heights in post nut clarity
  • 0
    @Awlex I still can't follow, but compile time makes me nervous. 😆
  • 0
    @IntrusionCM Doesn't have to :)

    After writing the text below: Sorry, I might have gone into to much detail

    We're working on an elixir/phoenix project. Configuration in these projects generally works like this:

    Before compiling, elixir will run the configuration code from the config file (config.exs) which in turn imports other configurations depending on the environment you're currently in (dev, test, prod).

    Then there's a separate configuration file for software releases (releases.exs), that are run before the software is started.

    Now what my boss did was this:
    config.exs <- staging host
    releases.exs <- production host

    But all of that is actually unnecessary because I just hardcoded it, because apple is the only OAuth provider ever that doesn't accept localhost as a redirect uri, which is why I had to overwrite it.
    It would have taken the correct host by removing my overwrite...
  • 0
    @Awlex hehe.

    Nah I like detail, brain has less to work. XD
Add Comment