manifest.json
file in the public
directory:
identity
permission is required for OAuth flows, and storage
is recommended for persisting
user sessions.Content Security Policy guidelines
frame-ancestors 'none'
directive prevents your extension from being embedded in frames,
protecting against clickjacking attacks.tabs
, activeTab
, or broad host permissions to reduce your
extension’s attack surface and improve user trust.chrome://extensions/
.chrome.identity.getRedirectURL()
to get the exact redirect URL programmatically.Open authentication context (options page or popup window)
AuthComponent
for both approaches - just render it in different HTML files
(options.html or auth.html).Redirect back to the extension