Skip to content

Instantly share code, notes, and snippets.

How not to fuck up OAuth2

I've seen a number of articles posted here recently that just give terrible advice when it comes to OAuth2, so I figured I'd make this so people would dick themselves over.

The reason people do this, is because they are just writing filler nonsense content in the hopes you'll click on the website. They don't care if the content is solid because they just want you to see the ads.

As for my credentials, I work for a major fintech company with part of my duties being to help developers get set up with OAuth2 in their applications.

If you aren't a lazy fuck, just read this, and the next section on decoupling. Otherwise I've summarised the important bits later on.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

AFI List [18/100]

  • [X] Citizen Kane
  • [ ] The Godfather
  • [ ] Casablanca
  • [ ] Raging Bull
  • [X] Singin’ in the Rain
  • [ ] Gone with the Wind (film)
  • [ ] Lawrence of Arabia (film)
  • [ ] Schindler’s List
  • [ ] Vertigo
@whynotavailable
whynotavailable / .editorconfig
Last active March 12, 2020 01:04
my editor config
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 3
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 3
@whynotavailable
whynotavailable / main.go
Last active March 9, 2020 22:31
middleware example in go
package main
import (
"errors"
"log"
"net/http"
)
type handler func(writer http.ResponseWriter, request *http.Request, context map[string]string) error
<!DOCTYPE html> <!-- doctype (just says it's HTML) -->
<html lang="en"> <!-- opening html root tag -->
<head> <!-- opening head tag, used for metadata -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body> <!-- tag for stuff that shows up -->
<h1>Hello Dick Fucks!</h1> <!-- header 1 tag (biggest size) -->
" run `export TERM=screen-256color` when using tmux
" run `git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim` to install
" Vundle, then run :PluginInstall
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()