如何为本地托管的应用程序设置重定向URI

huangapple go评论82阅读模式
英文:

How to set up the redirect URI for a locally hosted application

问题

I am trying to integrate gitlab's Oauth2 authentication for a script which is run locally on the machine using flask/waitress on localhost:80. The idea is that anyone who uses that script will have to first sign in using their gitlab credentials so only the script will be run only on the projects available to them. Can't use a group access token therefore using this by registering the application. Here's my question: What redirect URi should I use if the app is only run on localhost:80? Simply that? or something else?
this is the error i get when i try that. Please let me know, thanks.
ps: I tried https://localhost:80 but it gives an "localhost took too long to respond" error

英文:

I am trying to integrate gitlab's Oauth2 authentication for a script which is run locally on the machine using flask/waitress on localhost:80. The idea is that anyone who uses that script will have to first sign in using their gitlab credentials so only the script will be run only on the projects available to them. Can't use a group access token therefore using this by registering the application. Here's my question: What redirect URi should I use if the app is only run on localhost:80? Simply that? or something else?
this is the error i get when i try that. Please let me know, thanks.
ps: I tried https://localhost:80 but it gives an "localhost took too long to respond" error

答案1

得分: 0

除非您正在使用该脚本设置TLS(或SSL)(这不太可能,而且该端口默认用于纯文本通信),否则您只需使用http作为协议。所以尝试:

http://localhost:80

查看常见端口列表,特别是端口80(http)和端口443(https)。

英文:

Unless you're setting up TLS (or SSL) with that script (it's unlikely and that port is default for plain text communication anyways), you would just use http as the protocol. So try:

http://localhost:80

Take a look at this list of common ports, especially, ports 80 (http) and 443 (https).

huangapple
  • 本文由 发表于 2023年6月26日 23:47:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76558278.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定