# SHA Key

## ![](https://docs.pixelstrap.net/laravel/taxido/assets/images/icons/firebase.png)**How to add SHA-1 key in firebase :**

{% hint style="info" %} <i class="fa-bullhorn">:bullhorn:</i> NOTE :\
Before launching the app, ensure you have correctly set up the ADMIN LARAVEL and have added all necessary data through the admin panel.
{% endhint %}

Before using firebase data access or signin or signup in debug or release you need to add SHA-1 and SHA26 Key in Firebase. So let's see how to generate key. Go to <https://console.firebase.google.com/>

Genearate SHA-1 and SHA26 follow below steps:\
&#x20;\
&#x20;        There are 2 ways for geneta debug keys :<br>

1. In Android Studio or Video Studio open your project, open terminal and go to android folder just write below command<br>

   ```html
   cd android 
   ```

   \
   ![](https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FI41SMho4n3PmfxsWwNht%2Fimage.png?alt=media\&token=beb28a18-709a-4cbc-aeaa-61208b373c53)\
   \
   \
   Now enter another command for go to your android folder path<br>

   ```html
   ./gradlew signingReport 

   ```

   <figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FJP2Cfiz1btH6LFf87Mdf%2Fimage.png?alt=media&#x26;token=8d5ec41a-5e4d-4162-b884-39afd68a9946" alt=""><figcaption></figcaption></figure>
2. **For Debug mode** <br>

   ```html
   keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey 
   ```

```html
storepassword : android -keypassword android 
```

* For Release mode : <br>

  ```html
  keytool -list -v -keystore [keystore_name] -alias [alias_name] 
  ```

  ```html
  storepassword : android -keypassword android 
  ```

  <br>
* Example for Release mode :<br>

  ```html
  keytool -list -v -keystore /Users/projectmac/Documents/GitHub/probot/android/Taxido -alias key0 
  ```

  ```html
  storepassword : android -keypassword android 
  ```

1. After apply above command enter the line. You get the both SHA-1 and SHA26 key
2. Copy SHA-1 Key, Open your project in firebase project
3. On left hand side panel click on <i class="fa-gear">:gear:</i>. On click Setting button pop open open. In that click on Project Settings\ <br>

   <figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FzMHFDwvNnZVWbAtHuSm2%2Fimage.png?alt=media&#x26;token=da952592-bbd7-49f8-828d-1cce2f0aac41" alt=""><figcaption></figcaption></figure>
4. In General tab, go down in that click Add fingerprint<br>

   <figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2F08zn46jn5RXPptdI8V5y%2Fimage.png?alt=media&#x26;token=c1f11a0d-897f-4cac-be28-d80f19ef2b11" alt=""><figcaption></figcaption></figure>
5. Copy both SHA1 and SHA26 key for debug and release and paste it in fingerprint<br>

   <figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2Fi4utBZvMPsQQw2flOwJ2%2Fimage.png?alt=media&#x26;token=bec1c533-4b40-4aff-b6e4-aa4470dbd841" alt=""><figcaption></figcaption></figure>
6. For Create Bundle in android :\
   \
   If you want to create bundle instead of apk you have to add new signin SHA-1 From you google console like :   \
   Go to Google play console ⇒ Select you app ⇒ Setup section \[in left hand menu] ⇒ Click App Signin ⇒ Copy SHA-1 from app singin certificated and paste it to firebase project settings<br>

   <figure><img src="https://74030740-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6o4UzjBZtMQpeq4oeh8s%2Fuploads%2FJe63D1X77XAQ0WMvhSgP%2Fimage.png?alt=media&#x26;token=947d1d08-1d14-47c3-835a-76c81dba2fe8" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Now go to the Connect With Admin: [Connect With Admin](https://docs.pixelstrap.net/laravel/taxido/firebase_admin.html).
{% endhint %}
