# Okta with Springboot

**URL:** <https://devforum.okta.com/t/okta-with-springboot/34087>\
**Category:** OAuth/OIDC\
**Tags:** api, spring, java\
**Created:** [August 7, 2025, 4:53pm UTC](https://devforum.okta.com/t/okta-with-springboot/34087 "2025-08-07T16:53:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prashshyam](https://avatars.discourse-cdn.com/v4/letter/p/ec9cab/32.png) [@prashshyam](https://devforum.okta.com/u/prashshyam)\
**Post date:** [August 7, 2025, 4:53pm UTC](https://devforum.okta.com/t/okta-with-springboot/34087/1 "2025-08-07T16:53:57Z")

</div>

Hi,

I have a springboot with html/javascript app where springboot is serving both html content and backend API data as well..So its serving both front end and backend data…Now I want to integrate this app with okta..can you suggest the best way to implement this?I integrated with okta springboot starter but concern I have is;to secure my REST API endpoints which am calling using javascript fetch calls I have to pass the access token that I get after successful okta authentication in every request header and currently am using spring security defualtSuccessUrl where am getting okta tokens..So is there a better way to do this?Like use okta-auth js SDK?I believe okta-auth-js is more secure as SDK’s token manager handles all tokens rather than storing tokens in memory..please suggest…also am using spring boot version 3.4.x..so which okta-auth-js version should I be using?Also if am using okta-auth-js should I be setting up my app as SPA in the okta developer account ?This is not a Single Page Application but am not sure if I have to select web or SPA?

---

<div class="post-metadata">

**Author:** ![circle](https://avatars.discourse-cdn.com/v4/letter/c/7993a0/32.png) [@circle](https://devforum.okta.com/u/circle)\
**Post date:** [August 9, 2025, 8:39pm UTC](https://devforum.okta.com/t/okta-with-springboot/34087/2 "2025-08-09T20:39:41Z")

</div>

Hello,

To better assist you, could you please tell me if you’re planning on handling authentication on the front-end or the back-end?

Here are some of our relevant SDKs and our widget. We recommend taking a look to see what best fits your needs.

[Okta Auth JS SDK](https://github.com/okta/okta-auth-js)  
[Okta Sign-In Widget](https://github.com/okta/okta-signin-widget)  
[Okta Spring Boot Starter](https://github.com/okta/okta-spring-boot)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [September 8, 2025, 8:40pm UTC](https://devforum.okta.com/t/okta-with-springboot/34087/3 "2025-09-08T20:40:42Z")

</div>

Closed on September 8, 2025, 8:40pm UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
