An example to use Gitea Oauth2 login
Go to file
2019-03-02 18:49:36 +08:00
templates init project 2019-03-02 18:45:27 +08:00
.gitignore init project 2019-03-02 18:45:27 +08:00
main.go init project 2019-03-02 18:45:27 +08:00
README.md add README 2019-03-02 18:49:36 +08:00

Example for Gitea login

steps

  • run your gitea on http://localhost:3000
  • go to your settings and add an oauth2 application
  • change ClientID and ClientSecret on the main.go
  • go build and run the program
  • visit http://localhost:8000 on your webbrowser, first time you should be prompt to confirm the authorize
  • and then you can redirect to your http://localhost:8000 and you can see your user name and email on your gitea instance.