-
Notifications
You must be signed in to change notification settings - Fork 61
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
Github redirect uri not match. When i use https,how to deal with it? #94
Comments
Same problem using Discord as provider |
I failed to use it and there are few documents,so I prepare to develop my own oath2 application.😭😭😭😭 |
After thorough investigation (10 minutes playing with it), I found that something is downgrading the https request to http. Adding a log after this line will show us that the request the GitHub handler receives is flagged as http. // getRequestURL(event) prints out:
{ href: 'http://localhost:3000/auth/github',
origin: 'http://localhost:3000',
protocol: 'http:',
username: '',
password: '',
host: 'localhost:3000',
hostname: 'localhost',
port: '3000',
pathname: '/auth/github',
search: '',
searchParams: URLSearchParams {},
hash: '' } Since this package uses the Any thoughts @Atinux? Is this Vite/Nuxt dev server?
|
Is your project behind a proxy? If so, it might be because we don't specify the https://github.com/unjs/h3/blob/3249ca7ff5a430d59de6f9948478284dce395c97/src/utils/request.ts#L335 |
I haven't set up one manually. This is my whole export default defineNuxtConfig({
devtools: { enabled: true, componentInspector: true },
devServer: {
https: true,
},
css: ["@unocss/reset/tailwind-compat.css", "~/assets/css/main.css"],
modules: [
"shadcn-nuxt",
"@unocss/nuxt",
"nuxt-auth-utils",
"nuxt-icon",
"@vueuse/nuxt",
"@hebilicious/vue-query-nuxt",
],
vueQuery: {
queryClientOptions: {
defaultOptions: {
queries: {
staleTime: 1000 * 60 * 5, // 5 minutes
},
},
},
},
}); Does |
Yes,I set a nginx proxy for this application port and I bind it to my domain dev.brl0.top. |
Same issue for me -- I am using nignx to forward my port 80 traffic to Nuxt running on port 3000, and I notice the redirect_url is http, which is a mismatch. 🤔 This happens for both github and google, and probably others. |
This is my configs
![image](https://private-user-images.githubusercontent.com/43987995/333487933-86bf7029-1718-4c1f-9431-143adcc909fe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjA2OTcsIm5iZiI6MTcyMTc2MDM5NywicGF0aCI6Ii80Mzk4Nzk5NS8zMzM0ODc5MzMtODZiZjcwMjktMTcxOC00YzFmLTk0MzEtMTQzYWRjYzkwOWZlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDE4NDYzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVlOTlkYWRmMzg4YzU5NDk4NGNiMTUxOGYwMTcxMzBjODYxOGI0ZjFjNDUyZWFjMjNkZjRiMmNmMTI3NDg1ZjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.LB2KwPAO3dweA760O9TPRkC_OviRauH77_TnmmEv5Y4)
![image](https://private-user-images.githubusercontent.com/43987995/333488117-13ccbf5c-2659-4158-8931-7d6ade3bb473.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjE3NjA2OTcsIm5iZiI6MTcyMTc2MDM5NywicGF0aCI6Ii80Mzk4Nzk5NS8zMzM0ODgxMTctMTNjY2JmNWMtMjY1OS00MTU4LTg5MzEtN2Q2YWRlM2JiNDczLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA3MjMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNzIzVDE4NDYzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZlODMzODUyMTJmNmVlNWFhMWVmNTNmZTIwNGRmNWUwYjYzNjJjNDhjN2NmNGRkYTMxMjA2ZTBjZDljOTkzNDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.WB0-LyMdkZAxvOiLACoB9fnnUwJpHLaQXYPL4ZcLJWw)
Oh,it is so awful!
The text was updated successfully, but these errors were encountered: