Skip to content

Commit aee7f01

Browse files
authored
feat: Update client id scraping (#160)
There has apparently been a change to the JS file and where the client id is located. This change will search for the client id based on its format.
1 parent 5b46a18 commit aee7f01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tokendito/okta.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,12 +388,12 @@ def get_client_id_by_url(url):
388388
enduser_url = get_enduser_url(url)
389389
if enduser_url:
390390
res = HTTP_client.get(enduser_url)
391-
pattern = re.compile(r',clientId:"(?P<clientId>.*?)",')
391+
pattern = re.compile(r"(okta\..{8}-.{4}-.{4}-.{4}-.{12})")
392392

393393
match = pattern.search(res.text)
394394
if match:
395-
logger.debug(f"Found clientId: {match.group('clientId')}")
396-
client_id = match.group("clientId")
395+
logger.debug(f"Found clientId: {match.group()}")
396+
client_id = match.group()
397397

398398
return client_id
399399

0 commit comments

Comments
 (0)