{"id":26656,"date":"2023-03-22T20:34:36","date_gmt":"2023-03-22T13:34:36","guid":{"rendered":"https:\/\/www.caodangvietmy.edu.vn\/?p=26656"},"modified":"2023-04-05T13:58:12","modified_gmt":"2023-04-05T06:58:12","slug":"tich-hop-dang-nhap-google-cho-website-bang-php-va-mysql","status":"publish","type":"post","link":"https:\/\/www.caodangvietmy.edu.vn\/en\/tich-hop-dang-nhap-google-cho-website-bang-php-va-mysql\/","title":{"rendered":"Integrate Google login into your website using PHP and MySQL."},"content":{"rendered":"<p style=\"text-align: justify;\"><span style=\"font-size: 18pt; font-family: 'times new roman', times, serif;\"><strong>\u0110\u1eb7t v\u1ea5n \u0111\u1ec1<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Hi\u1ec7n nay \u0111\u1ec3 c\u00f3 th\u1ec3 t\u1ea1o th\u00eam nhi\u1ec1u s\u1ef1 ti\u1ec7n l\u1ee3i cho ng\u01b0\u1eddi d\u00f9ng, c\u0169ng nh\u01b0 vi\u1ec7c gi\u00fap ng\u01b0\u1eddi d\u00f9ng kh\u00f4ng ph\u1ea3i t\u1ea1o qu\u00e1 nhi\u1ec1u t\u00e0i kho\u1ea3n v\u00e0 ph\u1ea3i nh\u1edb t\u1eebng account \u0111\u1ec3 truy c\u1eadp v\u00e0o t\u1eebng h\u1ec7 th\u1ed1ng. C\u00e1c \u1ee9ng d\u1ee5ng website \u0111\u00e3 t\u1ea1o ra nhi\u1ec1u ti\u1ec7n \u00edch cho vi\u1ec7c t\u1ea1o t\u00e0i kho\u1ea3n nh\u01b0 vi\u1ec7c b\u1ea1n c\u00f3 th\u1ec3 login b\u1eb1ng t\u00e0i kho\u1ea3n google, facebook ho\u1eb7c github..vv. \u0110i\u1ec1u n\u00e0y kh\u00f4ng nh\u1eefng gi\u00fap cho ng\u01b0\u1eddi d\u00f9ng kh\u00f4ng c\u1ea7n m\u1ea5t th\u00eam th\u1eddi gian cho vi\u1ec7c t\u1ea1o 1 t\u00e0i kho\u1ea3n m\u1edbi v\u00e0 r\u1ed3i ph\u1ea3i nh\u1edb t\u1edbi n\u00f3 m\u1ed7i l\u00fac mu\u1ed1n \u0111\u0103ng nh\u1eadp v\u00e0o h\u1ec7 th\u1ed1ng.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Ngo\u00e0i ra t\u00edch h\u1ee3p c\u00e1c m\u1ea1ng x\u00e3 h\u1ed9i v\u00e0o ph\u1ea7n \u0111\u0103ng nh\u1eadp h\u1ec7 th\u1ed1ng website c\u00f3 nhi\u1ec1u c\u00e1c l\u1ee3i \u00edch nh\u01b0: Thu th\u1eadp th\u00eam th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng nh\u01b0 ng\u00e0y sinh, n\u01a1i sinh s\u1ed1ng, gi\u1edbi t\u00ednh&#8230; nh\u1eefng th\u00f4ng tin n\u00e0y ch\u00fang ta th\u01b0\u1eddng r\u00fat g\u1ecdn trong qu\u00e1 tr\u00ecnh \u0111\u0103ng k\u00fd t\u00e0i kho\u1ea3n. K\u1ebft h\u1ee3p v\u1edbi c\u00e1c h\u1ec7 th\u1ed1ng b\u00ecnh lu\u1eadn s\u1eed d\u1ee5ng m\u1ea1ng x\u00e3 h\u1ed9i r\u1ea5t thu\u1eadn ti\u1ec7n.<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\"><strong>Laravel Socialite t\u00edch h\u1ee3p x\u00e1c th\u1ef1c Google v\u00e0o website<\/strong><\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\"><strong>M\u00f4 t\u1ea3 \u1ee9ng d\u1ee5ng<\/strong><\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u0110\u1ea7u ti\u00ean m\u00ecnh s\u1ebd nh\u1ea5n n\u00fat \u0111\u0103ng nh\u1eadp google \u0111\u1ec3 login t\u00e0i kho\u1ea3n<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"583\" height=\"558\" class=\"wp-image-26693\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-1.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-1.png 583w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-1-272x260.png 272w\" sizes=\"(max-width: 583px) 100vw, 583px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau \u0111\u00f3 m\u00ecnh s\u1ebd ch\u1ecdn 1 t\u00e0i kho\u1ea3n google \u0111\u1ec3 \u0111\u0103ng nh\u1eadp trang web c\u1ee7a m\u00ecnh<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"505\" height=\"613\" class=\"wp-image-26695\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-2.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-2.png 505w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-2-214x260.png 214w\" sizes=\"(max-width: 505px) 100vw, 505px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau khi \u0111\u0103ng nh\u1eadp xong th\u00ec trang web s\u1ebd chuy\u1ec3n t\u1edbi trang ch\u1ee7 v\u00e0 hi\u1ec3n th\u1ecb t\u00ean ng\u01b0\u1eddi d\u00f9ng \u1edf tr\u00ean thanh menu.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"976\" height=\"504\" class=\"wp-image-26697\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-3.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-3.png 976w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-3-640x330.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-3-768x397.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-3-430x222.png 430w\" sizes=\"(max-width: 976px) 100vw, 976px\" \/><\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\"><strong>Th\u1ef1c hi\u1ec7n<\/strong><\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\"><strong>\u0110\u1ea7u ti\u00ean: <\/strong><\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>&#8211; <\/strong>C\u00e1c b\u1ea1n truy c\u1eadp v\u00e0o \u0111\u1ecba ch\u1ec9: <a href=\"https:\/\/console.cloud.google.com\/\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/console.cloud.google.com\/<\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 1: \u0110\u1ed1i v\u1edbi t\u00e0i kho\u1ea3n l\u1ea7n \u0111\u1ea7u ti\u00ean c\u00e1c b\u1ea1n c\u1ea7n t\u1ea1o 1 project m\u1edbi b\u1eb1ng c\u00e1ch nh\u1ea5p v\u00e0o <strong>CREATE PROJECT<\/strong>:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"1236\" height=\"223\" class=\"wp-image-26699\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4.png 1236w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4-640x115.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4-1024x185.png 1024w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4-768x139.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-4-430x78.png 430w\" sizes=\"(max-width: 1236px) 100vw, 1236px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 2: Sau \u0111\u00f3 c\u00e1c b\u1ea1n h\u00e3y \u0111\u1eb7t t\u00ean cho project c\u1ee7a m\u00ecnh v\u00e0 \u1ea5n CREATE:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">L\u01b0u \u00fd: \u0110\u1ed1i v\u1edbi t\u00e0i kho\u1ea3n th\u01b0\u1eddng th\u00ec ch\u1ec9 c\u1ea7n \u0111i\u1ec1n \u00f4 \u0111\u1ea7u ti\u00ean kh\u00f4ng c\u1ea7n \u0111i\u1ec1n 2 \u00f4 d\u01b0\u1edbi nh\u00e9 <img loading=\"lazy\" decoding=\"async\" width=\"636\" height=\"405\" class=\"wp-image-26701\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-5.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-5.png 636w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-5-408x260.png 408w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 3: Sau 1 kho\u1ea3ng th\u1eddi gian \u0111\u1ec3 d\u1ef1 \u00e1n c\u00e1c b\u1ea1n t\u1ea1o xong, c\u00e1c b\u1ea1n h\u00e3y ch\u1ecdn v\u00e0o tab <strong>Credentials <\/strong>&gt; <strong>Create Credentials <\/strong>&gt; <strong>0Auth client ID.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"518\" class=\"wp-image-26704\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-6.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-6.png 1022w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-6-640x324.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-6-768x389.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-6-430x218.png 430w\" sizes=\"(max-width: 1022px) 100vw, 1022px\" \/><\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 4: Sau khi v\u00e0o trang ti\u1ebfp theo c\u00e1c b\u1ea1n nh\u1ea5p v\u00e0o <strong>CONFIGURE CONSENT SCREEN<\/strong> <img loading=\"lazy\" decoding=\"async\" width=\"676\" height=\"374\" class=\"wp-image-26707\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-7.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-7.png 676w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-7-640x354.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-7-430x238.png 430w\" sizes=\"(max-width: 676px) 100vw, 676px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Ti\u1ebfp t\u1ee5c ch\u1ecdn: <strong>External &gt; Create<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"544\" class=\"wp-image-26709\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-8.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-8.png 708w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-8-640x492.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-8-338x260.png 338w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/span><\/p>\n<h2 style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 5: T\u1ea1i trang Edit app registration c\u00e1c b\u1ea1n ch\u1ec9 quan t\u00e2m nh\u1eefng th\u00f4ng tin \u1edf App Information v\u00e0 Developer contact information v\u00e0 \u0111i\u1ec1n nh\u1eefng th\u00f4ng tin v\u00e0o \u00f4 trong \u0111\u00f3 nh\u00e9 &gt; Save And Continute<\/span><\/h2>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"564\" height=\"522\" class=\"wp-image-26710\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-9.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-9.png 564w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-9-281x260.png 281w\" sizes=\"(max-width: 564px) 100vw, 564px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"203\" class=\"wp-image-26711\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-10.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-10.png 587w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-10-430x149.png 430w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u1ede trang <strong>Scopes <\/strong>v\u00e0 <strong>Test users <\/strong>n\u1ebfu c\u00e1c b\u1ea1n kh\u00f4ng y\u00eau c\u1ea7u quy\u1ec1n g\u00ec ho\u1eb7c th\u00eam ng\u01b0\u1eddi d\u00f9ng \u0111\u1ec3 test th\u00ec c\u1ee9 b\u1ecf qua n\u00f3 v\u00e0 \u1ea5n <strong>SAVE AND CONTINUE.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau khi t\u1ea5t c\u1ea3 b\u01b0\u1edbc tr\u00ean ho\u00e0n t\u1ea5t h\u00e3y \u1ea5n v\u00e0o <strong>Back to Dashboard.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u01b0\u1edbc 6: Ta c\u00f9ng quay l\u1ea1i <strong>b\u01b0\u1edbc 3<\/strong> s\u1ebd hi\u1ec3n th\u1ecb 1 giao di\u1ec7n kh\u00e1c khi b\u1ea1n \u1ea5n create 0auth client ID. T\u1ea1i \u0111\u00e2y \u1edf ph\u1ea7n <strong>Application type <\/strong>ch\u1ecdn <strong>Web Application.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"725\" height=\"492\" class=\"wp-image-26712\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-11.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-11.png 725w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-11-640x434.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-11-383x260.png 383w\" sizes=\"(max-width: 725px) 100vw, 725px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau khi ch\u1ecdn xong s\u1ebd hi\u1ec3n th\u1ecb sao di\u1ec7n nh\u01b0 b\u00ean d\u01b0\u1edbi<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"575\" height=\"820\" class=\"wp-image-26713\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-12.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-12.png 575w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-12-449x640.png 449w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-12-182x260.png 182w\" sizes=\"(max-width: 575px) 100vw, 575px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Name: <\/strong>T\u00ean b\u1ea1n mu\u1ed1n \u0111\u1eb7t cho APP c\u1ee7a b\u1ea1n.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Authorised JavaScript origins: <\/strong>L\u00e0 ph\u1ea7n trang ch\u1ee7 c\u1ee7a c\u00e1c b\u1ea1n. (v\u00ed d\u1ee5: http:\/\/localhost\/ ).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Authorised redirect URls: <\/strong>L\u00e0 \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ebfn file x\u1eed l\u00fd khi nh\u1eadn \u0111\u01b0\u1ee3c d\u1eef li\u1ec7u d\u1ea1ng <strong>GET<\/strong> c\u1ee7a google tr\u1ea3 v\u1ec1. (v\u00ed d\u1ee5: <a href=\"http:\/\/localhost\/xulyGoogle.php\" rel=\"nofollow noopener\" target=\"_blank\">http:\/\/localhost\/xulyGoogle.php<\/a> ).<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Cu\u1ed1i c\u00f9ng l\u00e0 \u1ea5n<strong> CREATE.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"531\" class=\"wp-image-26714\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-13.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-13.png 619w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-13-303x260.png 303w\" sizes=\"(max-width: 619px) 100vw, 619px\" \/><\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">L\u00fac n\u00e0y Google s\u1ebd cung c\u1ea5p cho b\u1ea1n 2 key l\u00e0: <strong>Your Client ID <\/strong>v\u00e0 <strong>Your Client Secret.<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Nh\u1edb l\u01b0u 2 t\u1ee5i n\u00f3 l\u1ea1i nha ????. M\u00e0 l\u1ee1 c\u00f3 qu\u00ean th\u00ec c\u00e1c b\u1ea1n v\u00e0o ph\u1ea7n <strong>Credentials <\/strong>v\u00e0 t\u00ecm c\u00e1i app c\u1ee7a m\u00ecnh v\u00e0 nh\u1ea5p v\u00e0o c\u00e2y b\u00fat ch\u00ec &gt; \u1edf g\u00f3c b\u00ean ph\u1ea3i b\u1ea1n s\u1ebd th\u1ea5y 2 c\u00e1i key tr\u00ean nha. Ti\u1ebfn h\u00e0nh code th\u00f4i n\u00e0o ????????????????????????.<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\"><strong>T\u1ed5 ch\u1ee9c code:<\/strong><\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">T\u1ea3i th\u01b0 vi\u1ec7n h\u1ed7 tr\u1ee3:<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><a href=\"https:\/\/github.com\/googleapis\/google-api-php-client\/releases\" rel=\"nofollow noopener\" target=\"_blank\">https:\/\/github.com\/googleapis\/google-api-php-client\/releases<\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">(Ch\u1ecdn PHP version b\u1ea1n \u0111ang s\u1eed d\u1ee5ng nha. \u1ede \u0111\u00e2y m\u00ecnh s\u1ebd s\u1eed d\u1ee5ng b\u1ea3n PHP-7.4).<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">K\u1ebft n\u1ed1i database: m\u00ecnh s\u1ebd s\u1eed d\u1ee5ng PDO k\u1ebft n\u1ed1i v\u1edbi mySQL nh\u00e9.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">+ K\u1ebft n\u1ed1i database k\u1ebf th\u1eeba (Class): <a href=\"https:\/\/drive.google.com\/file\/d\/1q_9snAh_5zxKsbzzDXLikxNVAvcDKQww\/view?usp=sharing\" rel=\"nofollow noopener\" target=\"_blank\">T\u1ea3i v\u1ec1 t\u1ea1i \u0111\u00e2y.<\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">+ K\u1ebft n\u1ed1i database function: <a href=\"https:\/\/drive.google.com\/file\/d\/1Y2o9odyYeLbqldtoXzzS5CqWXAD57kci\/view?usp=sharing\" rel=\"nofollow noopener\" target=\"_blank\">T\u1ea3i v\u1ec1 t\u1ea1i \u0111\u00e2y.<\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Okay v\u1eady l\u00e0 ch\u00fang m\u00ecnh \u0111\u00e3 \u0111\u1ee7 d\u1ee5ng c\u1ee5 \u0111\u1ec3 chi\u1ebfn r\u1ed3i \u0111\u00f3 \ud83d\ude00 c\u00e1c b\u1ea1n h\u00e3y m\u1edf xampp v\u00e0 t\u1ea1o 1 d\u1ef1 \u00e1n v\u1edbi c\u1ea5u tr\u00fac nh\u01b0 b\u00ean d\u01b0\u1edbi nh\u00e9<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"268\" height=\"243\" class=\"wp-image-26715\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-14.png\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Index.php: <\/strong>Trang d\u1eabn v\u00e0o trang web c\u1ee7a c\u00e1c b\u1ea1n.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Database.php: <\/strong>File k\u1ebft n\u1ed1i PHP \u0111\u1ebfn mySQL \u0111\u1ec3 th\u1ef1c hi\u1ec7n l\u01b0u tr\u1eef th\u00f4ng tin v\u00e0o c\u01a1 s\u1edf d\u1eef li\u1ec7u.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>xulyGoogle.php: <\/strong>N\u01a1i ti\u1ebfp nh\u1eadn k\u1ebft qu\u1ea3 \u0111\u1ec3 x\u1eed l\u00fd th\u00f4ng tin t\u1eeb Google tr\u1ea3 v\u1ec1 \u0111\u00e3 khai b\u00e1o \u1edf google.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Th\u01b0 m\u1ee5c: <\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong> Login-google: <\/strong>Th\u01b0 vi\u1ec7n h\u1ed7 tr\u1ee3 k\u1ebft n\u1ed1i t\u1edbi google \u1edf tr\u00ean.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Views: <\/strong>N\u01a1i ch\u1ee9a c\u00e1c file giao di\u1ec7n nh\u01b0: header,footer,css,js\u2026<\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">T\u1ea1o Database<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">B\u1ea1n t\u1ea1o 1 table v\u1edbi c\u1ea5u tr\u00fac nh\u01b0 sau: (t\u00ean b\u1ea3ng l\u00e0: <strong>TEST<\/strong>)<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"896\" height=\"272\" class=\"wp-image-26716\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-15.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-15.png 896w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-15-640x194.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-15-768x233.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-15-430x131.png 430w\" sizes=\"(max-width: 896px) 100vw, 896px\" \/><\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">K\u1ebft n\u1ed1i t\u1edbi database: database c\u1ee7a m\u00ecnh l\u00e0 <strong>ASM<\/strong><\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">(C\u00e1c b\u1ea1n s\u1eed d\u1ee5ng 1 trong 2 file connect \u1edf tr\u00ean nh\u00e9.)<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"621\" height=\"266\" class=\"wp-image-26717\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-16.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-16.png 621w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-16-430x184.png 430w\" sizes=\"(max-width: 621px) 100vw, 621px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Dbname: <\/strong>T\u00ean database<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>$username: <\/strong>T\u00e0i kho\u1ea3n phpmyadmin (m\u1eb7c \u0111\u1ecbnh xampp l\u00e0: root)<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>$password: <\/strong>M\u1eadt kh\u1ea9u phpMyAdmin (M\u1eb7c \u0111\u1ecbnh l\u00e0 r\u1ed7ng)<\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">T\u1ed5 ch\u1ee9c index:<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"530\" height=\"447\" class=\"wp-image-26718\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-17.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-17.png 530w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-17-308x260.png 308w\" sizes=\"(max-width: 530px) 100vw, 530px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">M\u00ecnh s\u1ebd g\u1ecdi c\u00e1c file nh\u01b0 sau:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Header: <\/strong> \u0110\u1ea7u trang<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Database:<\/strong> K\u1ebft n\u1ed1i c\u01a1 s\u1edf d\u1eef li\u1ec7u<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Function:<\/strong> File vi\u1ebft ch\u1ee9c n\u0103ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>Footer: <\/strong>Ch\u00e2n trang<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">M\u00ecnh s\u1ebd s\u1eed d\u1ee5ng Session \u0111\u1ec3 l\u01b0u th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng n\u00ean m\u00ecnh s\u1ebd khai b\u00e1o <strong>session_start() <\/strong>v\u00e0 n\u1ebfu t\u00ecm th\u1ea5y <strong>$_SESSION[\u2018id\u2019] <\/strong>th\u00ec s\u1ebd d\u1eabn \u0111\u1ebfn trang <strong> Home <\/strong> ng\u01b0\u1ee3c l\u1ea1i m\u00ecnh s\u1ebd chuy\u1ec3n \u0111\u1ebfn trang <strong>LOGIN.<\/strong><\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">Giao di\u1ec7n login:<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"945\" height=\"419\" class=\"wp-image-26719\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-18.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-18.png 945w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-18-640x284.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-18-768x341.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-18-430x191.png 430w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Code: S\u1eed d\u1ee5ng <strong>BOOTSTRAP 5.1<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"890\" height=\"442\" class=\"wp-image-26720\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-19.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-19.png 890w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-19-640x318.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-19-768x381.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-19-430x214.png 430w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">Vi\u1ebft ch\u1ee9c n\u0103ng:<\/span><\/li>\n<\/ol>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">T\u1ea1o ch\u1ee9c n\u0103ng l\u1ea5y th\u00f4ng tin client v\u1edbi <strong>Client ID <\/strong>v\u00e0 <strong>Client Secret<\/strong> m\u00e0 \u1edf tr\u00ean m\u00ecnh \u0111\u00e3 n\u00f3i c\u00e1c b\u1ea1n h\u00e3y l\u01b0u l\u1ea1i. H\u00e3y vi\u1ebft v\u00e0o file function.php nh\u00e9.<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Code:<\/span><\/p>\n<ul style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">function clientGoogle(){<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \/\/ L\u1ea5y nh\u1eefng gi\u00e1 tr\u1ecb n\u00e0y t\u1eeb https:\/\/console.google.com<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client_id = &#8221;; \/\/ Client ID<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client_secret = &#8221;; \/\/ Client secret<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $redirect_uri = &#8216;http:\/\/localhost\/xulyGoogle.php&#8217;; \/\/ URL t\u1ea1i Authorised redirect URIs<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client = new <em>Google_Client<\/em>();<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client-&gt;setClientId($client_id);<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client-&gt;setClientSecret($client_secret);<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client-&gt;setRedirectUri($redirect_uri);<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client-&gt;addScope(&#8220;email&#8221;);<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $client-&gt;addScope(&#8220;profile&#8221;);<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 return $client;<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0<\/span><\/li>\n<li><span style=\"font-family: 'times new roman', times, serif;\">}<\/span><\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">L\u01b0u \u00fd: Khi g\u1ecdi file function \u1edf index ph\u1ea3i n\u1eb1m d\u01b0\u1edbi file th\u01b0 vi\u1ec7n k\u1ebft n\u1ed1i c\u1ee7a google nh\u00e9.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"428\" height=\"124\" class=\"wp-image-26721\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-20.png\" \/><\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">T\u1ea1o \u0111\u01b0\u1eddng d\u1eabn \u0111\u1ec3 \u0111i \u0111\u1ebfn trang \u0111\u0103ng nh\u1eadp c\u1ee7a google.<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"417\" height=\"539\" class=\"wp-image-26722\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-21.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-21.png 417w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-21-201x260.png 201w\" sizes=\"(max-width: 417px) 100vw, 417px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau khi c\u00e1c b\u1ea1n c\u00f3 \u0111\u01b0\u1ee3c 1 function l\u00e0 <strong>clientGoogle() <\/strong>h\u00e3y g\u00e1n cho n\u00f3 1 bi\u1ebfn n\u00e0o \u0111\u00f3 \u0111\u1ec3 cho d\u1ec5 nh\u1edb d\u1ec5 s\u1eed d\u1ee5ng nh\u00e9 \u1edf \u0111\u00e2y m\u00ecnh s\u1ebd g\u00e1n cho n\u00f3 l\u00e0 1 bi\u1ebfn $client.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">H\u00e0m <strong>createAuthUrl() <\/strong>c\u00f3 s\u1eb5n trong th\u01b0 vi\u1ec7n login google v\u00ec th\u1ebf m\u00ecnh ch\u1ec9 c\u1ea7n g\u1ecdi h\u00e0m kia \u0111\u1ec3 l\u1ea5y th\u00f4ng tin client v\u00e0 xu\u1ea5t th\u00f4ng tin URL \u0111\u0103ng nh\u1eadp ra th\u00f4i \ud83d\ude00<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">C\u00f3 bi\u1ebfn <strong>$url <\/strong> c\u00e1c b\u1ea1n ch\u1ec9 vi\u1ec7c g\u00e1n v\u00e0o href c\u1ee7a n\u00fat \u0111\u0103ng nh\u1eadp google l\u00e0 \u0111\u01b0\u1ee3c.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"708\" height=\"112\" class=\"wp-image-26723\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-22.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-22.png 708w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-22-640x101.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-22-430x68.png 430w\" sizes=\"(max-width: 708px) 100vw, 708px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"108\" class=\"wp-image-26724\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-23.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-23.png 800w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-23-640x86.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-23-768x104.png 768w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-23-430x58.png 430w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/span><\/p>\n<ol style=\"text-align: justify;\">\n<li><span style=\"font-family: 'times new roman', times, serif;\">X\u1eed l\u00fd khi ng\u01b0\u1eddi d\u00f9ng login v\u00e0o:<\/span><\/li>\n<\/ol>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Sau khi login \u1edf \u0111\u01b0\u1eddng link b\u1ea1n \u0111\u00e3 khai b\u00e1o s\u1ebd \u0111\u01b0\u1ee3c google tr\u1ea3 v\u1ec1 c\u00e1c d\u1eef li\u1ec7u d\u1ea1ng GET nh\u01b0 sau:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><img loading=\"lazy\" decoding=\"async\" width=\"760\" height=\"74\" class=\"wp-image-26725\" src=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-24.png\" srcset=\"https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-24.png 760w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-24-640x62.png 640w, https:\/\/www.caodangvietmy.edu.vn\/wp-content\/uploads\/2023\/03\/word-image-26656-24-430x42.png 430w\" sizes=\"(max-width: 760px) 100vw, 760px\" \/><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><a href=\"http:\/\/localhost\/xulyGoogle.php?code=4%2F0A34XCWi37rAPAcxITnJtD0-aQbcE2H6YV_SHvhmu4dbqC28TajyAWV1vue75Xj5WAQ7aLQ&amp;scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&amp;authuser=2&amp;prompt=consent\" rel=\"nofollow noopener\" target=\"_blank\">http:\/\/localhost\/xulyGoogle.php?code=4%2F0A34XCWi37rAPAcxITnJtD0-aQbcE2H6YV_SHvhmu4dbqC28TajyAWV1vue75Xj5WAQ7aLQ&amp;scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&amp;authuser=2&amp;prompt=consent#<\/a><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">L\u00fac n\u00e0y c\u00e1c b\u1ea1n ch\u1ec9 quan t\u00e2m \u0111\u1ebfn bi\u1ebfn code hay trong php s\u1ebd l\u00e0 <strong>$_GET[\u2018code\u2019]<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">V\u00e0 c\u00e1c b\u1ea1n ch\u1ec9 c\u1ea7n l\u1ea5y bi\u1ebfn $_GET[\u2018code\u2019] v\u1ec1 v\u00e0 x\u1eed l\u00fd ti\u1ebfp \u1edf file <strong>xulyGoogle.php<\/strong> nh\u00e9.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\"><strong>X\u1eed l\u00fd:<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Vi\u1ebft 2 h\u00e0m: Ki\u1ec3m tra th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng v\u00e0 h\u00e0m th\u00eam ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ Ki\u1ec3m tra ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">function checkThongTin($username,$rule=&#8221;){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \/\/ n\u1ebfu r\u1ed7ng th\u00ec ki\u1ec3m tra theo username<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 if($rule == &#8221;){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $sql=&#8217;SELECT * FROM `test` WHERE `username` = ?&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \/\/ ng\u01b0\u1ee3c l\u1ea1i ki\u1ec3m tra theo id<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 }else{<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $sql=&#8217;SELECT * FROM `test` WHERE `id` = ?&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 }<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 return pdo_query_one($sql,$username);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">}<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ Th\u00eam ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">function insertUser($username, $password,$token,$email,$avatar){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 $sql=&#8217;INSERT INTO `test`(`username`,`password`,`token`,`email`,`avatar`)VALUES(?, ?, ?, ?, ?)&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 pdo_execute($sql,$username, $password,$token,$email,$avatar);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">}<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Code file <strong> xulyGoogle.php:<\/strong><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;?php<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">ob_start(); \/\/ kh\u1eafc ph\u1ee5c l\u1ed7i chuy\u1ec3n h\u01b0\u1edbng header<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">session_start();<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ G\u1ecdi file Database v\u00e0o s\u1eed d\u1ee5ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">require &#8216;database.php&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ G\u1ecdi th\u01b0 vi\u1ec7n login goolge<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">require &#8216;login-google\/vendor\/autoload.php&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ G\u1ecdi file function<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">require &#8216;function.php&#8217;;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ client<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">$client = clientGoogle();<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ T\u1ea1o ra 1 bi\u1ebfn m\u1edbi \u0111\u1ec3 l\u1ea5y th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">$service = new <em>Google_Service_Oauth2<\/em>($client);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ Ki\u1ec3m tra xem c\u00f3 $_GET[&#8216;code&#8217;] kh\u00f4ng. n\u1ebfu kh\u00f4ng th\u00ec tr\u1edf v\u1ec1 login c\u00f2n kh\u00f4ng th\u00ec ti\u1ebfp t\u1ee5c x\u1eed l\u00fd<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">if(isset($_GET[&#8216;code&#8217;])){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \/\/ Ki\u1ec3m tra m\u00e3 code c\u00f3 h\u1ee3p l\u1ec7 hay kh\u00f4ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 $check = $client-&gt;authenticate($_GET[&#8216;code&#8217;]);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \/\/ M\u00e3 code s\u1ebd ph\u00e1t sinh trong l\u1ea7n request \u0111\u1ea7u ti\u00ean l\u1ea7n ph\u00e1t sinh sau s\u1ebd l\u1ed7i.<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \/\/ V\u00e0 m\u00e3 code s\u1ebd sinh ra 1 \u0111o\u1ea1n array c\u00f3 c\u00e1c key l\u00e0: error(m\u00e3 l\u1ed7i), error_description(Th\u00f4ng b\u00e1o l\u1ed7i)<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 if(isset( $check[&#8216;error&#8217;] )){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 echo $check[&#8216;error_description&#8217;];<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 }else{<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \/\/ Th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $user = $service-&gt;userinfo-&gt;get();<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \/\/ L\u1ea5y th\u00f4ng tin ng\u01b0\u1eddi d\u00f9ng<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 $info = checkThongTin($user-&gt;email ); \/\/ l\u1ea5y token b\u1eb1ng h\u00e0m getAccessToken<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 if(!$info){<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ N\u1ebfu kh\u00f4ng c\u00f3 t\u00e0i kho\u1ea3n th\u00ec th\u00eam 1 t\u00e0i kho\u1ea3n m\u1edbi<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $email = $user-&gt;email; \/\/ var_dump($user) ra xem<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $avatar = $user-&gt;picture; \/\/ var_dump($user) ra xem<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $password = $user-&gt;name; \/\/ password t\u1ea1o ra cho vui n\u00ean m\u00ecnh g\u00e1n lu\u00f4n l\u00e0 fullname nha ^^<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $token = mt_rand(1000,50000); \/\/ h\u00e0m getAccessToken c\u1ee7a th\u01b0 vi\u1ec7n<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 insertUser($email, $password,$token,$email,$avatar); \/\/ th\u00eam ng\u01b0\u1eddi d\u00f9ng v\u00e0o n\u00e8<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ SET SESSION[&#8216;id&#8217;] v\u00e0 tr\u1edf v\u1ec1 trang ch\u1ee7<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $_SESSION[&#8216;id&#8217;] = $info[&#8216;id&#8217;];<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 header(&#8216;location: \/index.php&#8217;);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 }else{<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \/\/ N\u1ebfu \u0111\u00e3 c\u00f3 t\u00e0i kho\u1ea3n th\u00ec set SESSION[&#8216;id&#8217;] v\u00e0 tr\u1edf v\u1ec1 l\u1ea1i trang ch\u1ee7<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 $_SESSION[&#8216;id&#8217;] = $info[&#8216;id&#8217;];<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 header(&#8216;location: \/index.php&#8217;);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 \u00a0 \u00a0 }<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 }<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">}else{<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 header(&#8216;location: \/index.php&#8217;);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">}<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">?&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">X\u1eed l\u00fd th\u00eam 1 x\u00edu \u1edf file <strong>Home.php <\/strong>n\u1eefa l\u00e0 xong r\u1ed3i ^^<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;?php<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\/\/ g\u1ecdi h\u00e0m l\u1ea5y th\u00f4ng tin d\u1ef1a v\u00e0o session id n\u00e8<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">$user_info = checkThongTin($_SESSION[&#8216;id&#8217;], 1);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">?&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;div&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 &lt;h2&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">Xin ch\u00e0o b\u1ea1n. &lt;strong <em>class<\/em>=&#8217;text-success&#8217;&gt;&lt;?= $user_info[&#8216;password&#8217;] ?&gt;&lt;\/strong&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;\/h2&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;h4&gt;Email c\u1ee7a b\u1ea1n l\u00e0: &lt;strong <em>class<\/em>=&#8217;text-primary&#8217;&gt; &lt;?= $user_info[&#8217;email&#8217;] ?&gt;&lt;\/strong&gt;&lt;\/h4&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;form <em>action<\/em>=&#8221;&#8221;&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 <!-- T\u1ea1o th\u00eam 1 file logout \u0111\u1ec3 h\u1ee7y Session \u0111i l\u00e0 xong ^^ --><\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">\u00a0 \u00a0 &lt;a <em>href<\/em>=&#8217;logout.php&#8217; <em>class<\/em>=&#8217;btn btn-sm btn-danger&#8217;&gt;\u0110\u0103ng xu\u1ea5t&lt;\/a&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;\/form&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;\/h2&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;\/div&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">C\u00e1c b\u1ea1n t\u1ea1o th\u00eam 1 file <strong>logout.php<\/strong> \u0111\u1ec3 x\u00f3a SESSION \u0111i n\u1eefa l\u00e0 xong r\u1ed3i ^^:<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">&lt;?php<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">session_start(); \/\/ Khai b\u00e1o h\u00e0m session cho File logout tr\u01b0\u1edbc<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">session_destroy(); \/\/ h\u00e0m h\u1ee7y t\u1ea5t c\u1ea3 c\u00e1c session tr\u00ean trang web<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">header(&#8216;location: \/index.php&#8217;);<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">?&gt;<\/span><\/p>\n<p style=\"text-align: justify;\"><span style=\"font-family: 'times new roman', times, serif;\">V\u1eady l\u00e0 xong r\u1ed3i \u0111\u00f3 ^^. Ch\u00fac c\u00e1c b\u1ea1n th\u00e0nh c\u00f4ng.<\/span><\/p>\n<p style=\"text-align: justify;\">\n","protected":false},"excerpt":{"rendered":"<p>Problem Statement: Currently, in order to create more convenience for users, and to help users avoid creating too many accounts and having to remember each account to access each system, website applications have created many useful features for account creation\u2026<\/p>","protected":false},"author":63,"featured_media":26693,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[33,877,851,626,850],"tags":[],"_links":{"self":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts\/26656"}],"collection":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/comments?post=26656"}],"version-history":[{"count":0,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/posts\/26656\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/media\/26693"}],"wp:attachment":[{"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/media?parent=26656"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/categories?post=26656"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.caodangvietmy.edu.vn\/en\/wp-json\/wp\/v2\/tags?post=26656"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}