{"_id":"@coji/remix-auth-google","_rev":"6-d4bbfbfed459e3aeb9c5288db32f725d","name":"@coji/remix-auth-google","dist-tags":{"latest":"4.2.0"},"versions":{"3.0.0":{"name":"@coji/remix-auth-google","version":"3.0.0","keywords":["remix","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@3.0.0","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"7cbb918618b7ad768ef67895c6d6fcde60a45e0b","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-3.0.0.tgz","fileCount":5,"integrity":"sha512-LzB/QoyG0w/TDkmlwYIL0pb9j/dLkVPaQHKRSXBl3wMG/TkXkdVXQXeDMgKC1Yncs8jEcd/j4ZKwlgEBoID1Qw==","signatures":[{"sig":"MEUCIQC+2QysaZcXFHWJ2vnsmCSMdFLNVuQw69t4UvLvQYkC+gIgLdfxZvJWYddJnaVNRibGKiIXQPYr1eesZ8hvwTBLNNY=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9543},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-3.0.0.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/82d2a2df85b688a7010d54976828f773/coji-remix-auth-google-3.0.0.tgz","_integrity":"sha512-LzB/QoyG0w/TDkmlwYIL0pb9j/dLkVPaQHKRSXBl3wMG/TkXkdVXQXeDMgKC1Yncs8jEcd/j4ZKwlgEBoID1Qw==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.8.1","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"husky":">=6","react":"^18.3.1","prettier":"^3.3.3","remix-auth":"^3.7.0","typescript":"^5.6.3","lint-staged":">=12.1.4","@biomejs/biome":"^1.9.4","@remix-run/node":"^2.13.1","@remix-run/react":"^2.13.1","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"peerDependencies":{"remix-auth":"^3.7.0","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_3.0.0_1729838129117_0.1303914127397201","host":"s3://npm-registry-packages"}},"3.0.1":{"name":"@coji/remix-auth-google","version":"3.0.1","keywords":["remix","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@3.0.1","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"7e5840048251371cc1310eaa69d79697a76ab7ab","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-3.0.1.tgz","fileCount":5,"integrity":"sha512-YRKFEgdLXVDsMAz8q2fYHEwtTA3yY/QJ3GcQTIlEdgGa57LBy/H0hK4ReTJRBPjUxJE6Ma6AVZ1YPpy4qFYFcA==","signatures":[{"sig":"MEUCIBQAakDS7nur1biPbsOCIoxx1ihRnFu7N7hG1iVoWnf/AiEAzczcUws/SKK0q7KVuiPzceJJy7GM1tRQwAN5hQgpSpo=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9543},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-3.0.1.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/24bf7864ebb61552385e7e7ab5bd4b43/coji-remix-auth-google-3.0.1.tgz","_integrity":"sha512-YRKFEgdLXVDsMAz8q2fYHEwtTA3yY/QJ3GcQTIlEdgGa57LBy/H0hK4ReTJRBPjUxJE6Ma6AVZ1YPpy4qFYFcA==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.8.1","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"husky":">=6","react":"^18.3.1","prettier":"^3.3.3","remix-auth":"^3.7.0","typescript":"^5.6.3","lint-staged":">=12.1.4","@biomejs/biome":"^1.9.4","@remix-run/node":"^2.13.1","@remix-run/react":"^2.13.1","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"peerDependencies":{"remix-auth":"^3.7.0","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_3.0.1_1729839286299_0.08749814043896653","host":"s3://npm-registry-packages"}},"3.0.2":{"name":"@coji/remix-auth-google","version":"3.0.2","keywords":["remix","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@3.0.2","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"c8b25a56299ea239248b1fb588c6edc4dc3a876b","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-3.0.2.tgz","fileCount":5,"integrity":"sha512-M//2o6QbVK0l4Vwn8V5FHjBKgT4n0Lyju6RagoHePzdn2mbb7XY8VN7DkspgynHmkXUUwqJwsb3XInSW1pZ1Mg==","signatures":[{"sig":"MEYCIQDUqCH3YQdRALVcSBhH9FRtmnx3855eF9SIIrZ8L5bYuQIhAMM78Xpc1S8sxnfCOu7I+vVmAk2foCfnEDkOCGa/h12s","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9543},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-3.0.2.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/8a7b8d7b29bf5f4914fe49dc48cdbd2c/coji-remix-auth-google-3.0.2.tgz","_integrity":"sha512-M//2o6QbVK0l4Vwn8V5FHjBKgT4n0Lyju6RagoHePzdn2mbb7XY8VN7DkspgynHmkXUUwqJwsb3XInSW1pZ1Mg==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.8.1","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"husky":">=6","react":"^18.3.1","prettier":"^3.3.3","remix-auth":"^3.7.0","typescript":"^5.6.3","lint-staged":">=12.1.4","@biomejs/biome":"^1.9.4","@remix-run/node":"^2.13.1","@remix-run/react":"^2.13.1","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"peerDependencies":{"remix-auth":"^3.7.0","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_3.0.2_1729841435461_0.42551185458455","host":"s3://npm-registry-packages"}},"3.0.3":{"name":"@coji/remix-auth-google","version":"3.0.3","keywords":["remix","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@3.0.3","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"be0a3a4d5d28bb03ad30d2e26272b010daa53b79","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-3.0.3.tgz","fileCount":5,"integrity":"sha512-OomBLDRVIlSUP0EBFWLj/icwviUerSt/4KdoTb9LLljj/DOcu2sVB3jfKGxIZ/FNU7mV5Fbx0T3pgX3qWCBTIA==","signatures":[{"sig":"MEYCIQDD5eoTIb+AyBtrENbxKPNM/Khbd6bbE8e+a2V/OmX8eQIhAKS6BYeYrNaHN7WU2aZEKjXd/KtrZJ4krqcmD8Kbw7nt","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9047},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-3.0.3.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/6e90a585e2b1cec6afbf52c49236e306/coji-remix-auth-google-3.0.3.tgz","_integrity":"sha512-OomBLDRVIlSUP0EBFWLj/icwviUerSt/4KdoTb9LLljj/DOcu2sVB3jfKGxIZ/FNU7mV5Fbx0T3pgX3qWCBTIA==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.8.1","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"20.16.0","_hasShrinkwrap":false,"devDependencies":{"husky":">=6","react":"^18.3.1","prettier":"^3.3.3","remix-auth":"^3.7.0","typescript":"^5.6.3","lint-staged":">=12.1.4","@biomejs/biome":"^1.9.4","@remix-run/node":"^2.13.1","@remix-run/react":"^2.13.1","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"peerDependencies":{"remix-auth":"^3.7.0","remix-auth-oauth2":"^2.4.0","@remix-run/server-runtime":"^2.13.1"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_3.0.3_1729842017047_0.5723668152148431","host":"s3://npm-registry-packages"}},"4.0.0":{"name":"@coji/remix-auth-google","version":"4.0.0","keywords":["remix","react-router","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@4.0.0","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"79f19339d047f6b2d6b3b6caae50058f129993ab","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-4.0.0.tgz","fileCount":5,"integrity":"sha512-Qp9YHrJxtHsNwongpAIXp+ATWNH1MUQEf5KHVMcHFM/U2LLxItoXRadCcbIU37tUUI6lcrm50KhPmLqrdM1jKA==","signatures":[{"sig":"MEUCIAZ94EhlQDCoV9/t99q/X5IGn0Sr2gZGM8h7CloVNkz8AiEA83Im1K1wZl/Mx3k5A1bVr7CTQ5SaprcgYkqeVzTu0Ds=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":8511},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-4.0.0.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/254e0fc0f72a4cddce3d9b75dcb313b4/coji-remix-auth-google-4.0.0.tgz","_integrity":"sha512-Qp9YHrJxtHsNwongpAIXp+ATWNH1MUQEf5KHVMcHFM/U2LLxItoXRadCcbIU37tUUI6lcrm50KhPmLqrdM1jKA==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.9.0","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","arctic":"^2.3.0","prettier":"^3.4.1","typescript":"^5.7.2","lint-staged":"^15.2.10","@biomejs/biome":"^1.9.4","remix-auth-oauth2":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_4.0.0_1732685948044_0.06281954943294599","host":"s3://npm-registry-packages"}},"4.1.0":{"name":"@coji/remix-auth-google","version":"4.1.0","keywords":["remix","react-router","remix-auth","auth","authentication","strategy","google-auth"],"author":{"url":"https://github.com/coji","name":"Coji Mizoguchi","email":"coji@techtalk.jp"},"license":"MIT","_id":"@coji/remix-auth-google@4.1.0","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"homepage":"https://github.com/coji/remix-auth-google#readme","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"dist":{"shasum":"0363857fa7db2f61f6f7d0c7b84cc1cfaf81e39b","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-4.1.0.tgz","fileCount":5,"integrity":"sha512-v79RDPLEcj14pVEgi3MXUZPqXIzweQNxoBP0EYk5d0OBqHySFGEKLZo4CM8PD4XQwXP2pQg/L8CMJr579Ps1Cw==","signatures":[{"sig":"MEQCIH60nSZVsI0HZMhQ4qcD8ykvNk+dXB9u+gxx0FP9xu9QAiBXQE8bpRY3YTeCzOusnLyEjsSAyBxzWA5lpCLsnbuVwA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":9777},"main":"./build/index.js","type":"module","_from":"file:coji-remix-auth-google-4.1.0.tgz","types":"./build/index.d.ts","scripts":{"lint":"biome lint . --fix","build":"tsc --project tsconfig.json","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore .","typecheck":"tsc --project tsconfig.json --noEmit"},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/cd8093501674f0c61484ec28474f7385/coji-remix-auth-google-4.1.0.tgz","_integrity":"sha512-v79RDPLEcj14pVEgi3MXUZPqXIzweQNxoBP0EYk5d0OBqHySFGEKLZo4CM8PD4XQwXP2pQg/L8CMJr579Ps1Cw==","repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"_npmVersion":"10.9.0","description":"<!-- Description -->","directories":{},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"_nodeVersion":"22.11.0","_hasShrinkwrap":false,"devDependencies":{"husky":"^9.1.7","arctic":"^2.3.0","prettier":"^3.4.2","typescript":"^5.7.2","lint-staged":"^15.2.10","@biomejs/biome":"^1.9.4","remix-auth-oauth2":"^3.1.0"},"_npmOperationalInternal":{"tmp":"tmp/remix-auth-google_4.1.0_1733796891651_0.4753869518503153","host":"s3://npm-registry-packages-npm-production"}},"4.2.0":{"name":"@coji/remix-auth-google","version":"4.2.0","type":"module","main":"./build/index.js","types":"./build/index.d.ts","keywords":["remix","react-router","remix-auth","auth","authentication","strategy","google-auth"],"author":{"name":"Coji Mizoguchi","email":"coji@techtalk.jp","url":"https://github.com/coji"},"repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"license":"MIT","devDependencies":{"@biomejs/biome":"^1.9.4","arctic":"^3.2.1","husky":"^9.1.7","lint-staged":"^15.4.3","prettier":"^3.4.2","remix-auth-oauth2":"^3.2.2","typescript":"^5.7.3"},"lint-staged":{"*.{js,jsx,ts,tsx}":"pnpm lint","*.{js,jsx,ts,tsx,css,json,md}":"pnpm format"},"scripts":{"build":"tsc --project tsconfig.json","typecheck":"tsc --project tsconfig.json --noEmit","lint":"biome lint . --fix","format":"prettier --config .prettierrc --write --list-different --ignore-path .gitignore ."},"_id":"@coji/remix-auth-google@4.2.0","description":"<!-- Description -->","bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"homepage":"https://github.com/coji/remix-auth-google#readme","_integrity":"sha512-H9i3fvVz0GE18GUZHpz7p7FQjuiuloTIBAPjW7cfv7lUEk+mI6WRTVLEHJBLLuTlAF1+0EbzvPRYKutxZiFdfw==","_resolved":"/private/var/folders/69/7bdjxpf97kg_0f6xdbt1lgz80000gn/T/91da6cbcc279dc3be5e416fed6f0a5be/coji-remix-auth-google-4.2.0.tgz","_from":"file:coji-remix-auth-google-4.2.0.tgz","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-H9i3fvVz0GE18GUZHpz7p7FQjuiuloTIBAPjW7cfv7lUEk+mI6WRTVLEHJBLLuTlAF1+0EbzvPRYKutxZiFdfw==","shasum":"26aefbf70dcf5c7cfcbe0a74de8ec2e35bfbd77b","tarball":"https://registry.npmjs.org/@coji/remix-auth-google/-/remix-auth-google-4.2.0.tgz","fileCount":5,"unpackedSize":9762,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICukA0VXdpWiCjGoEKBsbqjFk6+UMfxBCW7eWgRuzWQ4AiB90BDn3zi4Yg2Jo3uE58wpi5lDsS/j7U5uEsF0s/RHQA=="}]},"_npmUser":{"name":"coji","email":"coji@techtalk.jp"},"directories":{},"maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/remix-auth-google_4.2.0_1737954341778_0.7654098845049564"},"_hasShrinkwrap":false}},"time":{"created":"2024-10-25T06:35:28.970Z","modified":"2025-01-27T05:05:42.122Z","3.0.0":"2024-10-25T06:35:29.320Z","3.0.1":"2024-10-25T06:54:46.485Z","3.0.2":"2024-10-25T07:30:35.626Z","3.0.3":"2024-10-25T07:40:17.245Z","4.0.0":"2024-11-27T05:39:08.183Z","4.1.0":"2024-12-10T02:14:51.835Z","4.2.0":"2025-01-27T05:05:41.959Z"},"bugs":{"url":"https://github.com/coji/remix-auth-google/issues"},"author":{"name":"Coji Mizoguchi","email":"coji@techtalk.jp","url":"https://github.com/coji"},"license":"MIT","homepage":"https://github.com/coji/remix-auth-google#readme","keywords":["remix","react-router","remix-auth","auth","authentication","strategy","google-auth"],"repository":{"url":"git+https://github.com/coji/remix-auth-google.git","type":"git"},"description":"<!-- Description -->","maintainers":[{"name":"coji","email":"coji@techtalk.jp"}],"readme":"# GoogleStrategy\n\n<!-- Description -->\n\nThe Google strategy is used to authenticate users against a Google account. It extends the OAuth2Strategy.\n\n## Supported runtimes\n\n| Runtime    | Has Support |\n| ---------- | ----------- |\n| Node.js    | ✅          |\n| Cloudflare | ✅          |\n\n<!-- If it doesn't support one runtime, explain here why -->\n\n## Usage\n\n### Create an OAuth application\n\nFollow the steps on [the Google documentation](https://developers.google.com/identity/protocols/oauth2/web-server#creatingcred) to create a new application and get a client ID and secret.\n\n### Create the strategy instance\n\n```ts\n// app/services/auth.server.ts\nimport { Authenticator } from 'remix-auth'\nimport { GoogleStrategy } from 'remix-auth-google'\nimport { createCookieSessionStorage, redirect } from 'react-router'\n\nexport type SessionUser = {\n  id: string\n  email: string\n  displayName: string\n  pictureUrl: string\n}\n\nlet SESSION_KEY = 'user'\nexport const sessionStorage = createCookieSessionStorage<{\n  [SESSION_KEY]: SessionUser\n}>({\n  cookie: {\n    name: '__session',\n    httpOnly: true,\n    path: '/',\n    sameSite: 'lax',\n    secrets: [process.env.SESSION_SECRET],\n    secure: process.env.NODE_ENV === 'production',\n  },\n})\n\nexport const getSession = async (request: Request) => {\n  return await sessionStorage.getSession(request.headers.get('Cookie'))\n}\n\nexport const getSessionUser = async (request: Request) => {\n  const session = await getSession(request)\n  return session?.get(SESSION_KEY)\n}\n\nexport const saveSession = async (request: Request, user: SessionUser) => {\n  const session = await getSession(request)\n  session.set(SESSION_KEY, user)\n  return new Headers({\n    'Set-Cookie': await sessionStorage.commitSession(session),\n  })\n}\n\nconst googleStrategy = new GoogleStrategy(\n  {\n    clientId: 'YOUR_CLIENT_ID',\n    clientSecret: 'YOUR_CLIENT_SECRET',\n    redirectURI: 'https://example.com/auth/google/callback',\n  },\n  async ({ accessToken, tokens }) => {\n    // Get the user data from your DB or API using the tokens and profile\n    const profile = await GoogleStrategy.userProfile(tokens)\n    return User.findOrCreate({ email: profile.emails[0].value })\n  },\n)\n\nexport const authenticator = new Authenticator<SessionUser>()\nauthenticator.use(googleStrategy)\n```\n\n### Setup your routes\n\n```tsx\n// app/routes/login.tsx\nexport default function Login() {\n  return (\n    <Form action=\"/auth/google\" method=\"GET\">\n      <button>Login with Google</button>\n    </Form>\n  )\n}\n```\n\n```tsx\n// app/routes/auth.google.tsx\nimport { authenticator } from '~/services/auth.server'\nimport type { Route } from './+types/auth.google'\n\nexport const loader = async ({ request }: Route.LoaderArgs) => {\n  return await authenticator.authenticate('google', request)\n}\n```\n\n```tsx\n// app/routes/auth.google.callback.tsx\nimport { redirect } from 'react-router'\nimport { authenticator, saveSession } from '~/services/auth.server'\nimport type { Route } from './+types/auth.google.callback'\n\nexport let loader = ({ request }: Route.LoaderArgs) => {\n  const user = authenticator.authenticate('google', request)\n  const headers = await saveSession(user)\n  return redirect('/dashboard', { headers })\n}\n```\n","readmeFilename":"README.md"}