i am building an webapp in react.js and using firebase for login by email/password method, but this error will not let me store the userid/password.mostly it is related to CORS issue.
this is my firebase configure code.
// Import the functions you need from the SDKs you need
import { initializeApp } from "firebase/app";
import { getAnalytics } from "firebase/analytics";
import { getAuth } from "firebase/auth";
// TODO: Add SDKs for Firebase products that you want to use
// https://firebase.google.com/docs/web/setup#available-libraries
// Your web app's Firebase configuration
// For Firebase JS SDK v7.20.0 and later, measurementId is optional,
HIDED the PERSONAL ID AND DATA
const firebaseConfig = {
apiKey: "AIzaSyDw6105zrb-IhlcZxDa****************",
authDomain: "netlfix-gpt******.web.app",
projectId: "netlfix-gpt******",
storageBucket: "netlfix-gpt*******.appspot.com",
messagingSenderId: "9065506*******",
appId: "1:906550651177:web:***************",
measurementId: "G-HQ********"
};
// Initialize Firebase
const app = initializeApp(firebaseConfig);
const analytics = getAnalytics(app);
export const auth= getAuth();
Firebase.json file code
{
"hosting": {
"public": "build",
"ignore": [
"firebase.json",
"**/.*",
"**/node_modules/**"
]
}
}
Firebaserc file Code:
{
"projects": {
"default": "netlfix-gpt-*****"
}
}
this is the firebase file codes.
i have tried other solution given on youtube,stackoverflow,but not so many answers,also readed firebase documentation,but not able to understand properly.
Here it is.DOCUMENTATION
https://firebase.google.com/docs/auth/web/redirect-best-practices?hl=en&authuser=0
const firebaseConfig = {
apiKey: "<api-key>",
authDomain: "<the-domain-that-serves-your-app>",
databaseURL: "<database-url>",
projectId: "<project-id>",
appId: "<app-id>"
};
this is error thrown
Cross origin redirect sign-in on Google Chrome M115+ is no longer supported, and will stop working on June 24, 2024.
Migrate to an alternative solution before June 24, 2024
End-users can continue to sign in to your app until June 24, 2024
This is already required on Firefox 109+ and Safari 16.1+
kindly help,stuck from 2 weeks.