<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Retrieve Bearer Token from React to use in Spring]]></title><description><![CDATA[<p dir="auto">I have just started using FusionAuth. I am currently working in integrating the FusionAuth with React and Spring. I facing problem which I don't know how to retrieve the Bearer Token to be send to Spring in as header "Authorization".</p>
<p dir="auto">Here is the code:<br />
<img src="/community/forum/assets/uploads/files/1699001916626-62894453-98b3-442f-b2c4-9cf57f290ead-image.png" alt="62894453-98b3-442f-b2c4-9cf57f290ead-image.png" class=" img-fluid img-markdown" /><br />
I am test using the user.token variable, but it has "undefined" value when I console it.</p>
]]></description><link>https://fusionauth.io/community/forum/topic/2547/retrieve-bearer-token-from-react-to-use-in-spring</link><generator>RSS for Node</generator><lastBuildDate>Tue, 09 Jun 2026 09:37:12 GMT</lastBuildDate><atom:link href="https://fusionauth.io/community/forum/topic/2547.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Nov 2023 09:01:21 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Retrieve Bearer Token from React to use in Spring on Fri, 03 Nov 2023 16:06:07 GMT]]></title><description><![CDATA[<p dir="auto"><a class="mention plugin-mentions-user plugin-mentions-a" href="https://fusionauth.io/community/forum/uid/2724">@zihaojustsimple</a> it looks like this is from the React application making a call to your Spring backend. We would need more code to understand where you are pulling in <code>user</code>.</p>
<p dir="auto">You could do this using our <a href="https://fusionauth.io/docs/sdks/react-sdk" rel="nofollow ugc">React SDK</a> another great place to see this in action is our <a href="https://github.com/fusionauth/fusionauth-example-react-sdk" rel="nofollow ugc">FusionAuth Example React SDK</a> application.</p>
<p dir="auto">If those examples don't get you the information you are looking for I would suggest trying out our <a href="https://www.npmjs.com/package/@fusionauth/typescript-client" rel="nofollow ugc">TypeScript client</a>.</p>
<p dir="auto">When using our <a href="https://fusionauth.io/docs/apis/login#response-cookies" rel="nofollow ugc">Login API</a> you will see that there is a HTTP Only cookie available with the <code>access_token</code> which you will need to make the call to your backend. We recommend passing this into your backend so that you can then verify that this is a valid user using server side code within Spring.</p>
<p dir="auto">If none of that works feel free to jump into our Slack community.<br />
<a href="https://fusionauth.io/community" rel="nofollow ugc">https://fusionauth.io/community</a></p>
]]></description><link>https://fusionauth.io/community/forum/post/6754</link><guid isPermaLink="true">https://fusionauth.io/community/forum/post/6754</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Fri, 03 Nov 2023 16:06:07 GMT</pubDate></item></channel></rss>