Do the <descope-swift> and <descope-kotlin >GitHub...
# ask-a-descoper
b
Do the descope-swift and descope-kotlin GitHub projects accept external PRs?
a
You're welcome to contribute to either!
b
Great! Thanks. We need support for custom cookie names just like the React SDK. Is this feature incoming or would that be a welcome contribution?
a
@Kevin Gao Any idea if this is something we're actively working on?
k
Hey @Benjamin Cassidy, are you using native flows with the Kotlin SDK? With mobile the session management works a little bit differently than the web. With the Kotlin SDK, the cookies are set in the browser, based on the configuration within your Descope project. You don't necessarily have to configure anything in the Kotlin SDK itself, and if you're using the
sessionManager
you'll have access to the session/access token from that.
b
@Kevin Gao We have a flow for user log in the uses custom cookie names. This breaks the mobile SDKs. The cookie names are hardcoded in the swift sdk:
Copy code
static let sessionCookieName = "DS"
    static let refreshCookieName = "DSR"
just as they are in the kotlin sdk:
Copy code
internal const val SESSION_COOKIE_NAME = "DS"
internal const val REFRESH_COOKIE_NAME = "DSR"
This means that when we use custom cookie names, the mobile SDKs cannot find them when it reads the cookies from the web view. The flow creates the cookies as "custom_session_cookie" and "custom_refresh_cookie" instead of the default "DS" and "DSR".
k
Oh I see what you're saying, the session manager can't get set because of this
b
Yeah
The javascript SDKs have the ability to change this so they know which cookies to look for
Copy code
sessionTokenViaCookie={{sameSite: 'Lax', secure: false, cookieName: 'MY_COOKIE'}}
@Kevin Gao I'm wondering if it would be alright if I implemented this into the mobile SDKs and made a PR. Or is this something y'all have in your roadmap?
k
Oh I was just going to say I already opened a PR for this
I'll have @Itai Hanski review and then we'll get you on your way
b
I didn't see those in the public repos.
k
I was setting up internal issues for this
b
Gotcha. Thank so much, @Kevin Gao
โœ… 1
Is there a swift one as well?
k
I haven't looked at the SDK yet, if it's the same boat then I'll add quickly. Have a meeting in like 3 mins but I'll look after if that's ok.
Ah yeah looks like it is
I'll fix that ๐Ÿ‘๐Ÿผ
b
Thank you!
I have this as well
b
Excellent! Looks good. Thank you. Will you cut new releases after these are merged?
๐Ÿ‘๐Ÿผ 1
k
Yep it should automatically release once I create it in GitHub
b
Hey, @Kevin Gao. Do you have an update on when these PRs will be merged? We have an internal deadline that's being held up until we can get the mobile apps working with the custom cookie names. Thank you
Happy Monday, @Kevin Gao and @Itai Hanski. I hope you had a good weekend. Do you have an update on Android and iOS support for custom cookie names? Our team is currently blocked on testing flows on mobile until we have SDK support for custom cookie names.
k
Hi Benjamin, Quick update here. After discussing with the team, the big issue is that if we release this, then the cookie name will be permanently set within the app as a static variable, and if that ever changes, that would require a person have to update the application in order to make the new name work. We would rather implement this in such a way where our backend will return the cookie name instead, making it more dynamic in nature. Iโ€™m currently working on getting an ETA for this but weโ€™re trying to expedite this as fast as possible for you guys
b
Thanks for the update. It's implemented with manual overrides in the Javascript SDKs which we're also using. Will those be changed as well to fetch the custom cookie name from the Descope API based on the project configuration?
k
I believe that's the plan. It looks like we're going to deploy the backend change to production on Wednesday evening, so we will release a new SDK version that's compatible with this shortly thereafter
b
Hi @Kevin Gao and @Gil Shapira The MRs for both platforms got merged. But I'm not seeing new releases for the swift and kotlin SDKs. Do you have an estimate on when those will be created?
@Kevin Gao @Gil Shapira Do you think you'll be able to make a new release this week?
g
Yea, we will. I'll ping here once the new versions are tested and released.
b
Thank you