[null,null,["最后更新时间 (UTC):2025-08-29。"],[],[],null,["# Frictionless sign-in\n\nSince the sign-in experience is the first interaction a user may have with your\nadd-on, it's important that they're able to complete the flow as seamlessly as\npossible. Read the sections below to familiarize yourself with the various\nsign-in APIs, sign-in related query parameter, how to handle pop-up blockers,\nand a test plan that you can use during development to ensure you're following\nbest practices.\n\nSSO implementation details\n--------------------------\n\n[Google's OAuth 2.0](/identity/protocols/oauth2) is compatible with many OAuth\n2.0 stacks. We **strongly** recommend implementing server-side authorization as\nit's the highest security option and supports using the [iframe query\nparameters](#sign-in_query_parameters).\n| **Tip:** Google's OAuth 2.0 implementation does not support redirects in iframes for security reasons; iframes must use a pop up to authenticate users.\n\nRefer to the technical guidance provided in the [Google Identity website](/identity/gsi/web) when\nimplementing Google sign-in. Be sure to follow the Google [sign-in branding\nguidelines](/identity/branding-guidelines). Sketch, SVG, and EPS files are provided for download.\n| **Important:** The [Google Sign-In JavaScript platform library for Web](/identity/sign-in/web/server-side-flow) is [deprecated as of March 2023](//developers.google.com/identity/sign-in/web/deprecation-and-sunset). This library shouldn't be used moving forward.\n\nSign-in tests\n-------------\n\nUse the add-ons [test plan](/static/workspace/classroom/assets/classroom_add_ons_test_plan.pdf) to check that your add-on is meeting the\nrequired standards and able to handle known edge cases before you submit your\nadd-on for review. These tests closely mirror the Classroom add-on\n[requirements checklist](/workspace/classroom/add-ons/requirements), and give you step-by-step instructions on how to check\nif your add-on meets those requirements. These are the same tests against which\nyour application is tested during publication.\n\nSign-in query parameters\n------------------------\n\nGoogle Classroom provides the `login_hint` query parameter to help facilitate\nrepeated sign-in. See the [sign-in related parameters section](/workspace/classroom/add-ons/developer-guides/iframes#sign-in_related_parameters) of the iframe\nquery parameters page for additional information. Sample code can be found in\nthe [handle repeat visits walkthrough](/workspace/classroom/add-ons/walkthroughs/repeat-login) of our developer walkthroughs.\n\nManage pop-up blockers\n----------------------\n\nSigning in to the add-on is facilitated by the sign-in dialog window. This\nwindow displays the account selector screen and allows the user to grant OAuth\npermissions. An end user's pop-up blocker could prevent them from completing the\nsign-in flow.\n\n**Figure 1.** An example of an **account selector screen**.\n\nTo resolve this problem, provide the end user with a button to click to bypass\nthe pop-up blocker. This interaction allows the sign-in dialog to be displayed\nso the end user can continue with the sign-in flow. Ensure that the button you\nprovide follows the [sign-in branding guidelines](/identity/branding-guidelines).\n\nFollow the [sign-in walkthrough](/workspace/classroom/add-ons/walkthroughs/sign-in) in our developer walkthroughs to implement a\nGoogle branded sign-in button that can be clicked to trigger the sign-in dialog.\n\nMulti-login\n-----------\n\nA browser with multiple accounts signed-in at the same time may disrupt the\nadd-on user flow. End users can either sign out of all Google Accounts in their\ncurrent browser *or* open Classroom in an incognito Chrome window\nbefore signing in with the correct account and retrying the operation.\n\nIf an incorrect user is signed-in to the add-on due to the multi-login issue,\nyour calls to the Classroom add-ons API may fail with an\n[`InvalidAddOnToken`](/workspace/classroom/reference/addons_errors#invalidaddontoken) error. If you receive such an error, you should instruct\nthe user to either sign out of all other accounts in the browser or open\nClassroom in an incognito Chrome window instead."]]