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

Updated UI/UX of elixir starter kit #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

aliaamuqaddas
Copy link
Contributor

@aliaamuqaddas aliaamuqaddas commented Oct 18, 2023

Explain your changes

Updated the UI/UX of elixir starter kit as we have for other starter kits.

Checklist

🛟 If you need help, consider asking for advice over in the Kinde community.

@aliaamuqaddas aliaamuqaddas marked this pull request as ready for review October 18, 2023 22:06
{conn, client} = KindeClientSDK.get_token(conn)

render(conn, "index.html", response: nil)
if KindeClientSDK.authenticated?(conn) do

Choose a reason for hiding this comment

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

We can have a separate scope in router for these authenticated resources.

## you can change the "iss" to any other claim-object-key
response = KindeClientSDK.get_claim(conn, "iss", :id_token)
render(conn, "index.html", response: response)
response = nil

Choose a reason for hiding this comment

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

Just small code refactor: we can even remove this variable and just pass nil in else part like response: nil

grant_type = :authorization_code_flow_pkce

{conn, _client} =
KindeClientSDK.init(

Choose a reason for hiding this comment

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

KindeClientSDK.init is reused multiple times, so it can be written in a function and call where it is needed

@mhtouseef9 mhtouseef9 mentioned this pull request Aug 21, 2024
2 tasks
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