분류 전체보기
-
플러터에 firebase 연결해서 구글 크롬으로 띄우기(구글 authentication)개발/flutter 2024. 5. 27. 17:06
firebase의 구글 authentication에 들어가면 로그인 방법이 이렇게 뜬다여기서 연필 모양을 누르면 웹 SDK 구성이 있는데 그걸 또 누르면 웹 클라이언트 ID가 있다.그것을 자신의 플러터 프로젝트의 web 폴더로 들어가서 index.html의 head태그 안에 다음과 같이 붙여넣으면 된다. 그 후 main.dart는 다음과 같이 작성해주자.아래는 파이어베이스를 초기화해주는 작업이다.import 'package:flutter/material.dart';import 'app.dart';import 'package:firebase_core/firebase_core.dart';import 'firebase_options.dart';void main() async { WidgetsFlutterB..