Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] 部署的时候环境变量设置了APIKEY和code,进入网站提示未设置,在settings页面设置了CODE,打开网页没有出现密码验证 #4437

Closed
3 tasks
mengluo04 opened this issue Apr 3, 2024 · 16 comments
Labels
bug Something isn't working

Comments

@mengluo04
Copy link

Bug Description

在vercel上部署,部署的时候环境变量设置了APIKEY和code,进入网站提示未设置,在settings页面设置了CODE,打开网页没有出现密码验证

Steps to Reproduce

1、fork项目
2、在vercel新建
3、选择fork的项目
4、设置环境变量
5、部署
6、进入页面
7、页面提示没有设置apikey和code
8、设置之后刷新或者新开页面没有弹出密码框

Expected Behavior

正常进行页面密码验证

Screenshots

No response

Deployment Method

  • Docker
  • Vercel
  • Server

Desktop OS

No response

Desktop Browser

No response

Desktop Browser Version

No response

Smartphone Device

No response

Smartphone OS

No response

Smartphone Browser

No response

Smartphone Browser Version

No response

Additional Logs

No response

@mengluo04 mengluo04 added the bug Something isn't working label Apr 3, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Title: [Bug] When deploying, the environment variables APIKEY and code are set. When entering the website, it prompts that they are not set. CODE is set on the settings page. When opening the web page, password verification does not appear.

@fengzai6
Copy link
Contributor

fengzai6 commented Apr 3, 2024

vercel中redeploy试试

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


Try redeploy in vercel

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


The same problem occurred. On my side, the CODE settings took effect, but the KEY and proxy did not take effect.

@fred-bf
Copy link
Contributor

fred-bf commented Apr 3, 2024

@mengluo04 cannot reproduce this issue. if you send message in chat did the app response letting user to set code?

@mengluo04
Copy link
Author

Bot detected the issue body's language is not English, translate it automatically.

Try redeploy in vercel

I do it now,but also not work right

@mengluo04
Copy link
Author

@mengluo04 cannot reproduce this issue. if you send message in chat did the app response letting user to set code?

I delete the project ,and create project,before deloy,i set the env
image
when deply success,I open the domain:https://chat-gpt-next-web-ten-lake-58.vercel.app/
the page show me not set key and code
image

@Kosette
Copy link

Kosette commented Apr 3, 2024

……
CODE的作用是保护网站不被没有授权的随意使用,服务端部署CODE,浏览器打开网站的时候需要输入CODE才能正常使用。
CODE会缓存在本地,不需要每次打开都输入,如果希望每次打开都输入,可以使用浏览器的隐私模式,不会保留任何缓存。

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.



The role of CODE is to protect the website from unauthorized use. CODE is deployed on the server side. When the browser opens the website, it needs to enter CODE for normal use.
CODE will be cached locally, so you don’t need to enter it every time you open it. If you want to enter it every time you open it, you can use the privacy mode of the browser, and no cache will be retained.

@mengluo04
Copy link
Author

…… CODE的作用是保护网站不被没有授权的随意使用,服务端部署CODE,浏览器打开网站的时候需要输入CODE才能正常使用。 CODE会缓存在本地,不需要每次打开都输入,如果希望每次打开都输入,可以使用浏览器的隐私模式,不会保留任何缓存。

无痕模式一样的,没有出现code验证页面,换浏览器也一样

@small05
Copy link

small05 commented Apr 4, 2024

…… CODE的作用是保护网站不被授权的随意使用,服务端配置CODE,浏览器打开网站的时候需要输入CODE才能正常使用。 CODE会缓存在本地,不需要每次打开都输入,如果需要另外打开都输入,可以使用浏览器的隐私模式,不会保留任何缓存。

无痕模式一样的,没有出现代码验证页面,换浏览器也一样

你要点登录,然后再登录页面输入你的code,本身是不会跳出来密码验证

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


... The role of CODE is to protect the website from unauthorized use. The server configures the CODE. When the browser opens the website, it needs to enter the CODE for normal use. CODE will be cached locally, so you don’t need to enter it every time you open it. If you need to enter it every time you open it again, you can use the privacy mode of the browser and no cache will be retained.

It’s the same in incognito mode, but the code verification page doesn’t appear, and it’s the same when changing browsers.

You click to log in, and then enter your code on the login page. The password verification will not pop up.

@mengluo04
Copy link
Author

…… CODE的作用是保护网站不被授权的随意使用,服务端配置CODE,浏览器打开网站的时候需要输入CODE才能正常使用。 CODE会缓存在本地,不需要每次打开都输入,如果需要另外打开都输入,可以使用浏览器的隐私模式,不会保留任何缓存。

无痕模式一样的,没有出现代码验证页面,换浏览器也一样

你要点登录,然后再登录页面输入你的code,本身是不会跳出来密码验证

在登录页设置了密码,然后新开一个无痕浏览器,打开页面也是一样的,没有出现密码验证。环境变量里设置的两个APIKEY都生效了,登录页的key设置不是必须的
image
在无痕模式打开,进入登录页,设置的密码没了。
image
在设置了密码的页面,在控制台的localstorage中,access-control变量里存在accessCode,但是刷新页面无效。
页面密码存在本地没有任何作用,因为环境变量里的key是生效了的,可以直接调用

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


... The role of CODE is to protect the website from unauthorized use. The server configures CODE. When the browser opens the website, it needs to enter CODE for normal use. CODE will be cached locally, so you don’t need to enter it every time you open it. If you need to enter it every time you open it again, you can use the privacy mode of the browser and no cache will be retained.

It’s the same in incognito mode, but the code verification page doesn’t appear, and it’s the same when changing browsers.

You click to log in, and then enter your code on the login page. The password verification will not pop up.

I set a password on the login page, then opened a new incognito browser, and it was the same when I opened the page, but no password verification appeared. The two APIKEYs set in the environment variables have taken effect, and the key setting on the login page is not necessary.
image
Open in incognito mode, enter the login page, and the password you set is gone.
image
On the page where the password is set, in the localstorage of the console, accessCode exists in the access-control variable, but refreshing the page has no effect.
The page password has no effect if it is stored locally, because the key in the environment variable is valid and can be called directly.

@Dean-YZG
Copy link
Contributor

Dean-YZG commented Apr 8, 2024

如果设置了CODE 环境变量,则会强制提示验证信息,除非曾经在『设置』中输入过 任意服务提供商的apikey

@Dean-YZG Dean-YZG closed this as completed Apr 8, 2024
@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


If the CODE environment variable is set, verification information will be forced to be prompted unless the apikey of any service provider has been entered in "Settings"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants