Rayrun
← Back to Discord Forum

Authenticating Once via Okta and Playwright programmatically

So I searched and found the post (https://discord.com/channels/807756831384403968/1106128054201356300) about okta authentication and though I am able to store the authentication into a json file. I was still prompted again to login when using the json. Does anyone have a working example authenticating once with Okta?

This thread is trying to answer question "Does anyone have a working example authenticating once with Okta and storing the authentication in a json file without being prompted to login again?"

4 replies

You need to check the okta timeout value from your IT or okta admin, as per the value you need to authenticate again and save it to json

@vibhanshu Not sure what your assumptions are, but to handle that, I am logging in and storing the state during the beginning of the testing fixture session in the session scope and then calling the context during the function fixture scope. That way okta timeout should not be a problem. Hence, a working example would be great actually because I can then compare and contrast what I have written to the work example. Saves people time responding and actually gives a living example since the solution on SO are not relevant to okta authentication.

What do you mean with session scope? A worker fixture? Could your issue be with multiple workers?

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].