prkhrkat

prkhrkat

pow integration without HTML

Hey Guys,

I was trying to use pow and pow_assent for autherisation in my phoenix app. But I am getting an error stating that -

(UndefinedFunctionError) function MyAppWeb.LayoutView.render/2 is undefined (module MyAppWeb.LayoutView is not available)

I am using the Pheonix project just for making APIs and that’s why I created the project with – no_html and – no_asset tags. Will I be able to use pow library in this case or i have to write it on my own?

First Post!

gianthamster

gianthamster

Pow probably assumes there’s HTML views for things like password reset requests, etc. What happens if you just create the MyAppWeb.LayoutView module, like so?

defmodule MyAppWeb.LayoutView do
  use MyAppWeb, :view
end

Last Post!

prkhrkat

prkhrkat

Have tried to find alternative ways but it did not work. I think authorization can be applied with guardian library. It would work even if the project is initiated with --no-html and --no-assets

Where Next?

Popular in Discussions Top

JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 55125 245
New
AlexMcConnell
The reason that Rails is as popular as it is is because it’s very easy for relatively inexperienced developers to get a lot of work done....
588 20142 166
New
boundedvariable
I am going through the kafka architecture. All the features what the kafka is providing are already in Erlang. I would like hear your opi...
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
Nvim
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New
Fl4m3Ph03n1x
Background This question comes mainly from my ignorance. Today is Black Friday, one of my favorite days of the year to buy books. One boo...
New
shishini
I think this twitter post and youtube video didn’t get as much attention as I hoped I am still new to Elixir, so can’t really judge ...
New

Other popular topics Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
sorentwo
Hello! tl;dr Announcing Oban, an Ecto based job processing library with a focus on reliability and historical observability. After spen...
985 44778 311
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement