Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add DT cookie and fix IDX for org auth servers #202

Merged
merged 3 commits into from
Jun 13, 2024
Merged

Conversation

rajdeepnanua-okta
Copy link
Contributor

@rajdeepnanua-okta rajdeepnanua-okta commented Jun 13, 2024

This PR adds DT cookie to IDX SDK. This is done mostly by copying the implementation from okta-mobile-kotlin code during the time of this PR: okta/okta-mobile-kotlin@cd65552
I have also added additional tests not present in okta-mobile-kotlin originally.

This PR also adds a small fix for using IDX using org auth servers, when the issuer url doesn't contain /oauth2 in the path

Copy link

@mikenachbaur-okta mikenachbaur-okta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but I had a minor question

@@ -41,10 +41,11 @@ import com.okta.idx.kotlin.dto.v1.Response as V1Response
/**
* The InteractionCodeFlow class is used to define and initiate an authentication workflow utilizing the Okta Identity Engine.
*/
class InteractionCodeFlow constructor(private val client: OAuth2Client) {
class InteractionCodeFlow(private val client: OAuth2Client) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious, is there a reason why the OAuth2Client is private? My Kotlin may be a bit rusty, but this will make it inaccessible to see by the developer, correct?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's correct. It's more of a legacy than an intentional decision to keep this private. I didn't think much about making this public because the developer can provide their own client to the constructor and have it available to them anyways. And it's also accessible to the developer through OAuth2Client.default if they construct the flow using the empty constructor. I can make this public

@rajdeepnanua-okta rajdeepnanua-okta merged commit 94a9e23 into master Jun 13, 2024
1 check was pending
@rajdeepnanua-okta rajdeepnanua-okta deleted the dt_cookie branch June 13, 2024 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants