Skip to content

Commit cfd6b68

Browse files
Update README.md (#305)
* Update README.md Removed parts that are no longer true after library refactor and cleanup some time ago. Fixed broken link to API reference.
1 parent 6ce4fc7 commit cfd6b68

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

auth-lib/README.md

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
# Spotify Authentication Library
1+
# Spotify Auth Library
22

33
[![Build Status](https://travis-ci.org/spotify/android-auth.svg?branch=master)](https://travis-ci.org/spotify/android-auth)
44
[![Maven Central](https://img.shields.io/maven-central/v/com.spotify.android/auth.svg)](https://search.maven.org/search?q=g:com.spotify.android)
55

6-
This library is responsible for authenticating the user and fetching the access token
7-
that can subsequently be used to play music or in requests to the [Spotify Web API](https://developer.spotify.com/web-api/).
6+
This library is responsible for authenticating the user and fetching the authorization code/access token that can subsequently be used to play music or in requests to the [Spotify Web API](https://developer.spotify.com/web-api/).
87

98
# Integrating the library into your project
109

@@ -22,53 +21,20 @@ repositories {
2221
}
2322
```
2423

25-
To learn more about working with authentication see the
26-
[Authentication Guide](https://developer.spotify.com/technologies/spotify-android-sdk/android-sdk-authentication-guide/)
27-
and the [API reference](https://developer.spotify.com/android-sdk-docs/authentication) on the developer site.
24+
To learn more see the [Authentication Guide](https://developer.spotify.com/technologies/spotify-android-sdk/android-sdk-authentication-guide/)
25+
and the [API reference](https://spotify.github.io/android-sdk/auth-lib/docs/index.html).
2826

2927
The following entries are merged into your manifest when you add the libary:
3028

3129
```xml
3230
<uses-permission android:name="android.permission.INTERNET"/>
3331

3432
<activity
35-
android:exported="true"
36-
android:name="com.spotify.sdk.android.authentication.AuthCallbackActivity"
37-
android:theme="@android:style/Theme.Translucent.NoTitleBar">
38-
39-
<intent-filter>
40-
<action android:name="android.intent.action.VIEW"/>
41-
<category android:name="android.intent.category.DEFAULT"/>
42-
<category android:name="android.intent.category.BROWSABLE"/>
43-
44-
<data
45-
android:scheme="@string/com_spotify_sdk_redirect_scheme"
46-
android:host="@string/com_spotify_sdk_redirect_host"/>
47-
</intent-filter>
48-
</activity>
49-
50-
<activity
51-
android:name="com.spotify.sdk.android.authentication.LoginActivity"
33+
android:name="com.spotify.sdk.android.auth.LoginActivity"
5234
android:theme="@android:style/Theme.Translucent.NoTitleBar">
5335
</activity>
5436
```
5537

56-
You will need to add the following strings to your project to enable Chrome CustomTabs
57-
login flow:
58-
59-
```xml
60-
<resources>
61-
<string name="com_spotify_sdk_redirect_scheme">yourscheme</string>
62-
<string name="com_spotify_sdk_redirect_host">yourhost</string>
63-
</resources>
64-
```
65-
66-
So, if you provided `bestapp://ismyapp` as a redirect URI in [the developer console](https://developer.spotify.com/my-applications/#!/applications)
67-
then you set `com_spotify_sdk_redirect_scheme` to `bestapp` and `com_spotify_sdk_redirect_host` to `ismyapp`.
68-
69-
Since Chrome CustomTabs share credentials with the Chrome instance you have installed
70-
you get much better experience logging users in compare to WebView flow.
71-
7238
# Sample Code
7339

7440
Checkout [the sample project](https://github.com/spotify/android-sdk/tree/master/auth-sample).

0 commit comments

Comments
 (0)