title: Is there a credential for Custom Auth System in Firebase?
body: <p>I'm signing users into my app with a custom token using their WordPress ID.</p>
  <pre><code>Auth.auth().signIn(withCustomToken: customToken ?? &quot;&quot;) { (user, error) in
    // ...
  }
  </code></pre>
  <p>That works ok but I need to update the rules which will keep users from writing to the database. This is counterproductive because I want to track the products they view etc...</p>
  <p>I want to sign the user anonymously when the app opens.</p>
  <pre><code>Auth.auth().signInAnonymously() { (authResult, error) in
    // ...
  }
  </code></pre>
  <p>I need to link the anonymous user to the WordPress user. Unfortunately, according to the documentation <a href="https://firebase.google.com/docs/auth/ios/account-linking" rel="nofollow noreferrer">https://firebase.google.com/docs/auth/ios/account-linking</a> the user needs to be linked with a credential but the credentials provided are GoogleAuthProvider, FacebookAuthProvider and EmailAuthProvider and several others but no Custom Provider.</p>
  <p>Is it possible to create a credential out of the custom token?</p>