पसंद के मुताबिक पुष्टि करने वाले सिस्टम का इस्तेमाल करके, Firebase की मदद से पुष्टि करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
Firebase से पुष्टि करने की सुविधा को कस्टम पुष्टि सिस्टम के साथ इंटिग्रेट करने के लिए, ये काम किए जा सकते हैं:
आपके ऑथेंटिकेशन सर्वर में बदलाव करना, ताकि जब कोई उपयोगकर्ता आपकी पसंद के मुताबिक साइन किए हुए टोकन जनरेट करे,
सफलतापूर्वक प्रवेश करता है. आपके ऐप्लिकेशन को यह टोकन मिलता है और पुष्टि करने के लिए इसका इस्तेमाल किया जाता है
के साथ काम करता है.
शुरू करने से पहले
अगर आपने पहले से ऐसा नहीं किया है, तो शुरू करें गाइड में दिए गए निर्देशों का पालन करें.
जब उपयोगकर्ता आपके ऐप्लिकेशन में साइन इन करें, तो अपने साइन-इन क्रेडेंशियल भेजें
उदाहरण के लिए, उनका उपयोगकर्ता नाम और पासवर्ड). आपका
सर्वर, क्रेडेंशियल की जांच करता है. अगर वे मान्य हैं, तो
पसंद के मुताबिक Firebase टोकन बनाता है
और टोकन को आपके ऐप्लिकेशन पर वापस भेजता है.
अपने ऑथेंटिकेशन सर्वर से कस्टम टोकन मिलने के बाद, उसे पास करें
उपयोगकर्ता के साइन इन करने के लिए signInWithCustomToken() को:
try{finaluserCredential=awaitFirebaseAuth.instance.signInWithCustomToken(token);print("Sign-in successful.");}onFirebaseAuthExceptioncatch(e){switch(e.code){case"invalid-custom-token":print("The supplied token is not a Firebase custom auth token.");break;case"custom-token-mismatch":print("The supplied token is for a different Firebase project.");break;default:print("Unknown error.");}}
अगले चरण
जब कोई उपयोगकर्ता नया खाता बना लेता है, तो इस खाते को आपके
Firebase प्रोजेक्ट बनाया जा सकता है. इसकी मदद से, आपके ऐप्लिकेशन में मौजूद हर ऐप्लिकेशन पर उपयोगकर्ता की पहचान की जा सकती है
प्रोजेक्ट के लिए बनाया गया है, चाहे उपयोगकर्ता ने साइन-इन करने के लिए किस तरीके का इस्तेमाल किया हो.
अपने ऐप्लिकेशन में, उपयोगकर्ता की बुनियादी प्रोफ़ाइल जानकारी को
User ऑब्जेक्ट. उपयोगकर्ताओं को मैनेज करना देखें.
अपने Firebase रीयल टाइम डेटाबेस और Cloud Storage के सुरक्षा नियमों में, ये काम किए जा सकते हैं
auth वैरिएबल से साइन-इन किए हुए उपयोगकर्ता का यूनीक यूज़र आईडी पाएं. इसके बाद, इसका इस्तेमाल इन कामों के लिए करें
तय करें कि उपयोगकर्ता कौनसा डेटा ऐक्सेस कर सकता है.
उपयोगकर्ताओं को, पुष्टि करने के एक से ज़्यादा तरीके का इस्तेमाल करके, अपने ऐप्लिकेशन में साइन इन करने की अनुमति दी जा सकती है
पुष्टि करने वाले के क्रेडेंशियल जोड़कर) सेवा देने वाली कंपनियों के साथ
मौजूदा उपयोगकर्ता खाते में साइन इन करें.
किसी उपयोगकर्ता को साइन आउट करने के लिए, signOut() पर कॉल करें:
[[["समझने में आसान है","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-25 (UTC) को अपडेट किया गया."],[],[],null,["# Authenticate with Firebase Using a Custom Authentication System\n\n\u003cbr /\u003e\n\nYou can integrate Firebase Authentication with a custom authentication system by\nmodifying your authentication server to produce custom signed tokens when a user\nsuccessfully signs in. Your app receives this token and uses it to authenticate\nwith Firebase.\n\nBefore you begin\n----------------\n\n1. If you haven't already, follow the steps in the [Get started](/docs/auth/flutter/start) guide.\n2. [Install and configure the Firebase Admin SDK](/docs/admin/setup). Be sure to [initialize the SDK](/docs/admin/setup#initialize-sdk) with the correct credentials for your Firebase project.\n\nAuthenticate with Firebase\n--------------------------\n\n1. When users sign in to your app, send their sign-in credentials (for\n example, their username and password) to your authentication server. Your\n server checks the credentials and, if they are valid,\n [creates a custom Firebase token](/docs/auth/admin/create-custom-tokens)\n and sends the token back to your app.\n\n2. After you receive the custom token from your authentication server, pass it\n to `signInWithCustomToken()` to sign in the user:\n\n try {\n final userCredential =\n await FirebaseAuth.instance.signInWithCustomToken(token);\n print(\"Sign-in successful.\");\n } on FirebaseAuthException catch (e) {\n switch (e.code) {\n case \"invalid-custom-token\":\n print(\"The supplied token is not a Firebase custom auth token.\");\n break;\n case \"custom-token-mismatch\":\n print(\"The supplied token is for a different Firebase project.\");\n break;\n default:\n print(\"Unknown error.\");\n }\n }\n\nNext steps\n----------\n\nAfter a user creates a new account, this account is stored as part of your\nFirebase project, and can be used to identify a user across every app in your\nproject, regardless of what sign-in method the user used.\n\nIn your apps, you can get the user's basic profile information from the\n`User` object. See [Manage Users](/docs/auth/flutter/manage-users).\n\nIn your Firebase Realtime Database and Cloud Storage Security Rules, you can\nget the signed-in user's unique user ID from the `auth` variable, and use it to\ncontrol what data a user can access.\n\nYou can allow users to sign in to your app using multiple authentication\nproviders by [linking auth provider credentials](/docs/auth/flutter/account-linking)) to an\nexisting user account.\n\nTo sign out a user, call `signOut()`: \n\n await FirebaseAuth.instance.signOut();"]]