<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ? in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598489#M27809</link>
    <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1543617"&gt;@didouchk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The description of your issue is not very "rich". Missing details on how you have done everything! The devil is in details. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D88F213CAFB196B6AB70612B08AD9D31/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt;&lt;/P&gt;&lt;P&gt;There is an &lt;A href="https://github.com/dropbox/dropbox-sdk-java/tree/main/examples/examples/src/main/java/com/dropbox/core/examples/authorize" target="_blank" rel="noopener"&gt;authorization example&lt;/A&gt; for Java SDK. PKCE implementation could be seen in &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/main/examples/examples/src/main/java/com/dropbox/core/examples/authorize/PkceAuthorize.java" target="_blank" rel="noopener"&gt;corresponding class&lt;/A&gt;. Take a look there and you can figure out what's missing in your code, I believe. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1543617"&gt;@didouchk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;..., but when I tried to access the credentials in the onResume method, ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are trying in onResume method, but is it as a result of real resume action (i.e. on authentication end)? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; ... or ...?&lt;/P&gt;</description>
    <pubDate>Sat, 04 Mar 2023 15:46:11 GMT</pubDate>
    <dc:creator>Здравко</dc:creator>
    <dc:date>2023-03-04T15:46:11Z</dc:date>
    <item>
      <title>Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598475#M27807</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to use the new authentication flow with short-live tokens and refresh tokens on&amp;nbsp; an Android App with Dropbox JDK.&lt;/P&gt;
&lt;P&gt;I'm using the&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Auth.&lt;SPAN&gt;startOAuth2PKCE&lt;/SPAN&gt;()&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;method which works correctly, but when I tried to access the credentials in the onResume method, &lt;/SPAN&gt;&lt;/P&gt;
&lt;PRE&gt;DbxCredential credential = Auth.&lt;SPAN&gt;getDbxCredential&lt;/SPAN&gt;()&lt;SPAN&gt;;&lt;BR /&gt;&lt;/SPAN&gt;credential.getRefreshToken()&lt;SPAN&gt;; &lt;/SPAN&gt;&lt;SPAN&gt;// NullPointerException&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I get a NullPointer exception.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'd like to access and save the refresh token to the shared prefs and resuse it to prevent the user to be logged out every 4 hours.&lt;/P&gt;
&lt;P&gt;Why the getDbxCredential() returns null ?&lt;/P&gt;
&lt;P&gt;Thanks for your help.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2022 06:51:45 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598475#M27807</guid>
      <dc:creator>didouchk</dc:creator>
      <dc:date>2022-05-23T06:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598489#M27809</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1543617"&gt;@didouchk&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;The description of your issue is not very "rich". Missing details on how you have done everything! The devil is in details. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D88F213CAFB196B6AB70612B08AD9D31/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt;&lt;/P&gt;&lt;P&gt;There is an &lt;A href="https://github.com/dropbox/dropbox-sdk-java/tree/main/examples/examples/src/main/java/com/dropbox/core/examples/authorize" target="_blank" rel="noopener"&gt;authorization example&lt;/A&gt; for Java SDK. PKCE implementation could be seen in &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/main/examples/examples/src/main/java/com/dropbox/core/examples/authorize/PkceAuthorize.java" target="_blank" rel="noopener"&gt;corresponding class&lt;/A&gt;. Take a look there and you can figure out what's missing in your code, I believe. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1543617"&gt;@didouchk&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;&lt;SPAN&gt;..., but when I tried to access the credentials in the onResume method, ...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You are trying in onResume method, but is it as a result of real resume action (i.e. on authentication end)? &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@9AD39CA637682E9616FBE31CDAF1B6C4/emoticons/1f914.png" alt=":thinking_face:" title=":thinking_face:" /&gt; ... or ...?&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 15:46:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598489#M27809</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2023-03-04T15:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598958#M27819</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1543617"&gt;@didouchk&lt;/a&gt; In addition to what Здравко said, note that there is &lt;A href="https://github.com/dropbox/dropbox-sdk-java/tree/main/examples/android" target="_self"&gt;an Android-specific example here&lt;/A&gt;. Make sure you're implementing the authorization flow &lt;A href="https://github.com/dropbox/dropbox-sdk-java/blob/main/examples/android/src/main/java/com/dropbox/core/examples/android/internal/api/DropboxOAuthUtil.kt#L33" target="_self"&gt;as shown&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And if something doesn't seem to be working as expected, please reply with:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;the version numbers of the Android platform and Dropbox SDK you are using&lt;/LI&gt;
&lt;LI&gt;the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)&lt;/LI&gt;
&lt;LI&gt;the full text of any error or unexpected output&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Mon, 06 Mar 2023 16:32:50 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/598958#M27819</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-03-06T16:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/665140#M30117</link>
      <description>&lt;P&gt;I'm just pointing out that ALL the links here are broken since the repository changed on GitHub&lt;/P&gt;</description>
      <pubDate>Sat, 04 Mar 2023 04:21:52 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/665140#M30117</guid>
      <dc:creator>PIXIP</dc:creator>
      <dc:date>2023-03-04T04:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Why Auth.getDbxCredential method returns null after PKCE authentication (Dropbox Android JDK) ?</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/665571#M30126</link>
      <description>&lt;P&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/1628325"&gt;@PIXIP&lt;/a&gt; Thanks for the note. I've updated the links in my post.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 16:33:11 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/Why-Auth-getDbxCredential-method-returns-null-after-PKCE/m-p/665571#M30126</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2023-03-06T16:33:11Z</dc:date>
    </item>
  </channel>
</rss>

