0maru / twitter_login

MIT License
54 stars 54 forks source link

do i need a server to handle token? #15

Closed bakboem closed 3 years ago

0maru commented 3 years ago

If your service is using a server, it is necessary to keep the login session. If you are using such as Auth0 or Firebase, you don't need a server.

bakboem commented 3 years ago

Unable to verify Google callbackURL

Error: The provided scheme is not valid. A scheme must not include any special characters, such as ":" or "/"

0maru commented 3 years ago

The Firebase callback URL to use are as follows. You can't put https in info.plist.

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <!-- Registered Callback URLs in TwitterApp -->
    <string>my-app-12345.firebaseapp.com/__/auth/handler</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>app</string>
    </array>
  </dict>
</array>
ousvat commented 3 years ago

my-app-12345.firebaseapp.com/__/auth/handl

Hi @0maru ! How should I put in AndroidManifest.xml the callback URL for firebase?

0maru commented 3 years ago

@bestkid1234 I don't think you can use the Firebase callback URL on Android. So, please add another callback URL on Twitter Developers.

ousvat commented 3 years ago

@0maru So I don't need to do any changes at AndroidManifest.xml?

bakboem commented 3 years ago

The Firebase callback URL to use are as follows. You can't put https in info.plist.

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <!-- Registered Callback URLs in TwitterApp -->
    <string>my-app-12345.firebaseapp.com/__/auth/handler</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>app</string>
    </array>
  </dict>
</array>

@bestkid1234 I don't think you can use the Firebase callback URL on Android. So, please add another callback URL on Twitter Developers.

The Firebase callback URL to use are as follows. You can't put https in info.plist.

<key>CFBundleURLTypes</key>
<array>
  <dict>
    <key>CFBundleTypeRole</key>
    <string>Editor</string>
    <key>CFBundleURLName</key>
    <!-- Registered Callback URLs in TwitterApp -->
    <string>my-app-12345.firebaseapp.com/__/auth/handler</string>
    <key>CFBundleURLSchemes</key>
    <array>
      <string>app</string>
    </array>
  </dict>
</array>

thank you !~ it worked!

0maru commented 3 years ago

@bakboem No. You need to write the callback URL you registered with Twitter Developer in AndroidManifest.xml

スクリーンショット 2020-12-05 22 09 02

For example add example://

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <!-- Accepts URIs that begin with "example://” -->
  <!-- Registered Callback URLs in TwitterApp -->
  <data android:scheme="example"
    android:host="" /> <!-- host is option -->
</intent-filter>
ousvat commented 3 years ago

@bakboem No. You need to write the callback URL you registered with Twitter Developer in AndroidManifest.xml

スクリーンショット 2020-12-05 22 09 02

For example add example://

<intent-filter>
  <action android:name="android.intent.action.VIEW" />
  <category android:name="android.intent.category.DEFAULT" />
  <category android:name="android.intent.category.BROWSABLE" />
  <!-- Accepts URIs that begin with "example://” -->
  <!-- Registered Callback URLs in TwitterApp -->
  <data android:scheme="example"
    android:host="" /> <!-- host is option -->
</intent-filter>

Sooo.... I can replace example:// with whatever I want?

0maru commented 3 years ago

@bestkid1234 Yes. You can alter it any way you like.