
<소셜로그인인 절차가 얼마나 간단한지 보여주는 짤>
https://console.firebase.google.com/




개발자문서의 코드를 수정하여 활용한다.
5-1. 인증부분 수정 firebase/auth를 CND에 있는 경로에 기반하여 수정한다.
ex) "firebase/auth" → “https://www.gstatic.com/firebasejs/10.11.0/firebase-auth.js”
import { getAuth, createUserWithEmailAndPassword } from "https://www.gstatic.com/firebasejs/10.11.0/firebase-auth.js";
const auth = getAuth();
createUserWithEmailAndPassword(auth, email, password)
.then((userCredential) => {
// Signed in
const user = userCredential.user;
// ...
})
.catch((error) => {
const errorCode = error.code;
const errorMessage = error.message;
// ..
});
구글로그인