با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
این صفحه برخی از مشکلات رایجی را که ممکن است در مورد احراز هویت و مجوز با آنها مواجه شوید، توضیح می دهد.
This app isn't verified
اگر صفحه رضایت OAuth اخطار «این برنامه تأیید نشده است» را نشان میدهد، برنامه شما دامنههایی را درخواست میکند که دسترسی به دادههای حساس کاربر را فراهم میکند. اگر برنامه شما از دامنه های حساس استفاده می کند، برنامه شما باید مراحل تأیید را طی کند تا آن هشدار و سایر محدودیت ها حذف شود. در مرحله توسعه، میتوانید با انتخاب Advanced > Go to {Project Name} (ناامن) از این هشدار عبور کنید.
File not found error for credentials.json
هنگام اجرای نمونه کد، ممکن است پیام خطای "فایل یافت نشد" یا "هیچ فایلی وجود ندارد" را در رابطه با credentials.json دریافت کنید.
این خطا زمانی رخ می دهد که شما اعتبار برنامه دسکتاپ را مجاز نکرده باشید. برای یادگیری نحوه ایجاد اعتبارنامه برای یک برنامه دسکتاپ، به Create credentials بروید.
پس از ایجاد اعتبارنامه، مطمئن شوید که فایل JSON دانلود شده به عنوان credentials.json ذخیره شده است. سپس فایل را به پوشه کاری خود منتقل کنید.
Token has been expired or revoked
هنگام اجرای نمونه کد، ممکن است پیغام خطای "Token is expired" یا "Token has been revokuar" دریافت کنید.
این خطا زمانی رخ می دهد که یک نشانه دسترسی از سرور مجوز Google منقضی شده باشد یا باطل شده باشد. برای اطلاعات در مورد علل و راهحلهای احتمالی، به انقضای نشانه Refresh مراجعه کنید.
خطاهای جاوا اسکریپت
در زیر برخی از خطاهای رایج جاوا اسکریپت آورده شده است.
Error: origin_mismatch
اگر میزبان و پورت مورد استفاده برای ارائه صفحه وب با منبع جاوا اسکریپت مجاز در پروژه کنسول Google Cloud شما مطابقت نداشته باشد، این خطا در جریان مجوز رخ می دهد. مطمئن شوید که یک منبع مجاز جاوا اسکریپت تنظیم کرده اید و URL موجود در مرورگر شما با URL مبدا مطابقت دارد.
idpiframe_initialization_failed: Failed to read the 'localStorage' property from 'Window'
این خطا زمانی رخ می دهد که کوکی های شخص ثالث و ذخیره سازی داده ها در مرورگر شما فعال نباشد. این گزینه ها توسط کتابخانه ورود به سیستم Google مورد نیاز است. برای اطلاعات بیشتر، کوکیهای شخص ثالث و ذخیرهسازی داده را ببینید.
idpiframe_initialization_failed: Not a valid origin for the client
این خطا زمانی رخ می دهد که دامنه ثبت شده با دامنه مورد استفاده برای میزبانی صفحه وب مطابقت نداشته باشد. اطمینان حاصل کنید که مبدایی که ثبت کرده اید با URL موجود در مرورگر مطابقت دارد.
تاریخ آخرین بهروزرسانی 2025-07-30 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-07-30 بهوقت ساعت هماهنگ جهانی."],[],[],null,["This page describes some common issues that you might encounter involving\nauthentication and authorization.\n\n`This app isn't verified`\n\nIf the OAuth consent screen displays the warning \"This app isn't verified,\" your\napp is requesting scopes that provide access to sensitive user data. If your\napplication uses sensitive scopes, your app must go through the\n[verification process](https://support.google.com/cloud/answer/7454865)\nto remove that warning and other limitations. During the development phase, you\ncan continue past this warning by selecting **Advanced \\\u003e Go to {Project Name}\n(unsafe)**.\n\n`File not found error for credentials.json`\n\nWhen running the code sample, you might receive a \"file not found\" or \"no such\nfile\" error message regarding credentials.json.\n\nThis error occurs when you have not authorized the desktop application\ncredentials. To learn how to create credentials\nfor a desktop application, go to\n[Create credentials](/workspace/guides/create-credentials#desktop-app).\n\nAfter you create the credentials, make sure the downloaded JSON file is saved as\n`credentials.json`. Then move the file to your working directory.\n\n`Token has been expired or revoked`\n\nWhen running the code sample, you might receive a \"Token has been expired\" or\n\"Token has been revoked\" error message.\n\nThis error occurs when an access token from the Google Authorization Server has\neither expired or has been revoked. For information about potential causes\nand fixes, see\n[Refresh token expiration](/identity/protocols/oauth2#expiration).\n\nJavaScript errors\n\nThe following are some common JavaScript errors.\n\n`Error: origin_mismatch`\n\nThis error occurs during the authorization flow if the host and port used\nto serve the web page doesn't match an allowed JavaScript origin on your\nGoogle Cloud console project. Make sure you set an authorized\nJavaScript origin and that the URL in your browser matches the origin URL.\n\n`idpiframe_initialization_failed: Failed to read the 'localStorage' property from 'Window'`\n\nThis error occurs when third-party cookies and data storage aren't enabled\nin your browser. These options are required by the Google Sign-in library. For\nmore information, see\n[3rd-party cookies and data storage](https://developers.google.com/identity/sign-in/web/troubleshooting#third-party_cookies_and_data_blocked).\n| **Note:** In your own app, you should prompt users to enable third-party cookies and data storage or add an exception for `accounts.google.com`.\n\n`idpiframe_initialization_failed: Not a valid origin for the client`\n\nThis error occurs when the domain registered doesn't match the domain being\nused to host the web page. Ensure that the origin you registered matches the URL\nin the browser."]]