{"id":17207806,"url":"https://github.com/pablof7z/omniauth-lightning","last_synced_at":"2026-05-02T05:08:01.050Z","repository":{"id":56886503,"uuid":"240884196","full_name":"pablof7z/omniauth-lightning","owner":"pablof7z","description":"OmniAuth strategy for Lightning Network","archived":false,"fork":false,"pushed_at":"2020-02-16T12:07:20.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-11T01:59:17.522Z","etag":null,"topics":["bitcoin","lightning-network","omniauth","omniauth-strategy","ruby-gem"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pablof7z.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-16T12:04:00.000Z","updated_at":"2022-03-18T10:14:22.000Z","dependencies_parsed_at":"2022-08-20T14:31:22.623Z","dependency_job_id":null,"html_url":"https://github.com/pablof7z/omniauth-lightning","commit_stats":null,"previous_names":["heelhook/omniauth-lightning"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/pablof7z/omniauth-lightning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablof7z%2Fomniauth-lightning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablof7z%2Fomniauth-lightning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablof7z%2Fomniauth-lightning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablof7z%2Fomniauth-lightning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pablof7z","download_url":"https://codeload.github.com/pablof7z/omniauth-lightning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pablof7z%2Fomniauth-lightning/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260684164,"owners_count":23046102,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","lightning-network","omniauth","omniauth-strategy","ruby-gem"],"created_at":"2024-10-15T02:46:41.105Z","updated_at":"2026-05-02T05:07:56.025Z","avatar_url":"https://github.com/pablof7z.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# omniauth-lightning\n\nThis gem implements an Omniauth strategy to login via the Lightning Network. It uses [LNPay.co]\nas the backend.\n\nOnce integrated, users of your application can submit an invoice from their own node,\nthis gem will decode the invoice to extract the pubkey of the user's node and use that pubkey\nas the UID of the user.\n\nNote that the user will submit Lightning Network invoices to your application, but your application\nwon't need to pay them.\n\n## Installation\n\nAdd to your `Gemfile`:\n\n```ruby\ngem 'omniauth-lightning'\n```\n\nand run `bundle install`.\n\n## Integration\n\nNext, tell OmniAuth about this provider. For a Rails app, your `config/initializers/omniauth.rb` file should look like this:\n\n```ruby\nRails.application.config.middleware.use OmniAuth::Builder do\n  provider :lightning,\n    invoice_sats_amount: 1,\n    validating_text: 'my-app-auth-string',\n    lnpay_key: 'my-lnpay-key' # secret api key from https://lnpay.co/dashboard/developers\nend\n```\n\nThis configuration will make the strategy require a `1 sat` invoice that includes the text `my-app-auth-string`\nto validate the invoice.\n\n### Configuration\n\nThe following settings are available:\n```ruby\n:title                      # title of the rendered form that prompts user to submit their invoice\n:sats_amount                # amount of sats that the invoice should include\n:validating_text            # text that should be included in the invoice's description\n:invoice_max_age_in_seconds # maximum age of invoices that are accepted in seconds\n:lnpay_key                  # Key from LNPay.co to use to decode invoices\n```\n\n### Error keys\n\nThe following errors might be returned from the gem; you might want to handle them on your\napplication to display errors:\n\n```ruby\n:invalid_invoice                 # invoice invalid\n:invoice_without_required_amount # invoice wasn't for the amount specified on :sats_amount\n:invoice_without_required_text   # invoice didn't include the required text specified on :validating_text\n:old_invoice                     # invoice is older than :invoice_max_age_in_seconds\n:custodial_wallet                # invoice was generated by a custodial wallet\n```\n\n## Customizing Invoice Form\n\nTo use your own custom invoice form, create a form that POSTs to '/auth/lightning/callback' with `invoice`.\n\n```erb\n\u003c%= form_tag '/auth/lightning/callback' do |f| %\u003e\n  \u003ch1\u003eSubmit your invoice\u003c/h1\u003e\n  \u003c%= text_field_tag :invoice %\u003e\n  \u003c%= submit_tag %\u003e\n\u003c% end %\u003e\n```\n\n## Example app\n\nIf you want to see an app using this gem, checkout [bitcoiners-best]. To see a live version of this, checkout https://bitcoiners.best/\n\n## Author\n\nWritten by [@pablof7z].\n\n[LNPay.co]: https://lnpay.co\n[bitcoiners-best]: https://github.com/bitcoiners-Best/bitcoinersbest\n[@pablof7z]: https://twitter.com/pablof7z\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablof7z%2Fomniauth-lightning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpablof7z%2Fomniauth-lightning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpablof7z%2Fomniauth-lightning/lists"}